I have an array, and I want to pass it as a parameter in a function such as:
function something(arrayP){ for(var i = 0; i < arrayP.length; i++){
It is possible to pass arrays to functions, and there are no special requirements for dealing with them. Are you sure that the array you are passing to to your function actually has an element at [0]?
[0]