memarray clone method and improvements