ivory-opts: Add missing cases for DynArray expressions.
ivory: Implement dynArrayRef function.

- Safe indexing a dynamic array with a run-time check and a
  failure continuation (like withDynArray and withRef).