Optimizations for 5% simple array index speedup.
Switch array assignment over to using assign_pos.

Together with the previous patch, array access now happens in 75% of
the time it used to.