Pull array into function as local variable
unroll inner most loop