Preallocate array memory