I assume that the arrays are both the same length. In which case you can simply do:
for (var i = 0, l = latitudeArray.length; i < l; i++) {
heatmapData.push(new google.maps.LatLng(latitudeArray[i], longitudeArray[i]));
}
Note that it's often better to declare your array length as a variable, in this case l
, so that the loop doesn't keep referencing the array length.