More performance improvements using manual array management