Declaring a function that uses array parameter variables