Extending Array.prototype