do not use `for (var in array)` syntax on arrays.

This was causing array prototypes to be used.

closes #309