replace a copy of array by a reference