However, I feel like something like this would be more elegant and efficient:
```js
ol.array.extend = function(array1, array2) {
  for (var i = 0, ii = array2.length; i < ii; i += 32767) {
    Array.prototype.push.apply(array1, array2.slice(i, i+32767));
  }
};