Use ArrayIterator instead of ArrayObject.

Simpler and better performance.
Simplify by extending ArrayIterator.

In this case, we just need to override the `offsetSet` and `offsetUnset`
methods to set the iterator in read-only mode.