reallocate array if size insufficient