Javascript Array Polyfill