Further improvements to ReallocateArrays