Array indexing operation rewritten