next (arrayLength) {
    if (arrayLength === 0) {
      return -1
    }

    const nextOffset = this._offset
    this._offset += 1
    if (this._offset === Number.MAX_SAFE_INTEGER) {
      this._offset = 0
    }

    return nextOffset % arrayLength
  }
Get next index for an array with given length.
@param {number} arrayLength the array length.
@return {number} index in the array.