Fixed Size Array Javascript Iterations