Extending the javascript Array objectJavaScript Array object is a really bad idea because you introduce new properties (your custom methods) into for-infor-in loops which can break existing scripts. A few years ago the authors of the PrototypePrototype library had to re-engineer their library implementation to remove just this kind of thing.
If you don't need to worry about compatibility with other javascriptJavaScript running on your page, go for it, otherwise, I'd recommend the more awkward, but safer free-standing function solution.