Add test for preallocated arrays.