Improve array memory allocations
3 files changed