Add imperative implementations of basic Array.prototype methods