How to pass array into javascript?

I have a global in a protocol @arr that is an array. When I build the form I would like to pass the array into the form and access it using javascript. So far I haven't had much success. I tried using ClientScriptManager.RegisterArrayDeclaration(), but wasn't able to get it to work.

For now I am converting @arr to a comma delimited list and passing that and then converting it into an array.

Is there a way to pass the array directly?

Thank you.

Derek