Implemented deep array copying