Adding Array functions and tests