Implemented 'pushOntoArray' function and unit test.