Check hasOwnProperty when iteration over keys on an array.

Hello. I ran into an error when using Ember.js with Sails. By default, Ember.js extends the array prototype to add some connivence methods to arrays which make them easier to work with in Ember. Unfortunately these properties show up as keys when iteration over an array using the `(key in array)` syntax. This pr checks if the key is on the array before using it to retrieve a value from the array.