Const correctness in array

Because the code `e.opAssign(e)` potentially actually ends up checking if you can assign *to* a const, which would fail. `index[i]` is not const, so is a much better check.