optimizing arrays for processing instances