This is to supplement zerkms's answer.
To pass data across language barriers, you would need a way to represent the data as a string by serializing the data. One of the serialization methods for JavaScript is JSON. In zerkms's example, the code would be placed inside of an aspx page. To combine his example and yours together on one aspx page, you would have,
<%
int[] numbers = new int[5];
// Fill up numbers...
var serializer = new System.Web.Script.Serialization.JavaScriptSerializer();
%>
somewhere later on the aspx page
<script type="text/javascript">
var jsVariable = <%= serializer.Serialize(numbers) %>;
</script>
This answer though, assumes that you are generating JavaScript from the initial page load. As per the comments in your post, this could have been done via AJAX. In that case, you would have the server respond with the result of the serialization and then deserialize it in JavaScript using your favorite framework.
Note: Also do not mark this as an answer since I wanted the syntax highlighting to make another answer more clear.