implemented the size member function of array