This will do what you want:
Code:
var id_arr = ["1","2","3","4","5"];
var checked_arr = new Array();
for (var i=0;i<id_arr.length;i++)
{
var element_to_check = document.getElementById(id_arr[i]);
if (element_to_check && element_to_check.checked) checked_arr.push(id_arr[i]);
}
You shouldn't be giving your html elements ids that start with a number though.
Array.push(value) adds
value to the end of the array instance.