Rewriting inject as an Array method.