Reduced memory usage by pooling arrays