Fix issues when Array.prototype has extra junk added onto it.

We do this by not using _.each on an array, since it's mean to pick up properties on objects as well.
use the coffeescript "for x in xs" where applicable