Finish implementing array functions, all tests passed