implements concat() method for array