NestedKeyArrayIterator implementation and tests