Added an enumerator implementation for wrapping arrays and saving the enumeration state.