def []=(index, value)
      index = validate_index_range(index)

      @store.transaction do
        if index < @entry_counter
          # Overwrite of an existing element
          @root.set(index, value)
        elsif index == @entry_counter
          # Append right at the end
          @root.insert(index, value)
          self.entry_counter += 1
        else
          # Append with nil padding
          @entry_counter.upto(index - 1) do |i|
            @root.insert(i, nil)
          end
          @root.insert(index, value)
          self.entry_counter = index + 1
        end
      end
    end
def []=(index, value)
      index = validate_index_range(index)

      @store.transaction do
        if index < @entry_counter
          # Overwrite of an existing element
          @root.set(index, value)
        elsif index == @entry_counter
          # Append right at the end
          @root.insert(index, value)
          self.entry_counter += 1
        else
          # Append with nil padding
          @entry_counter.upto(index - 1) do |i|
            @root.insert(i, nil)
          end
          @root.insert(index, value)
          self.entry_counter = index + 1
        end
      end
    end
Store the value at the given index. If the index already exists the old
 value will be overwritten.
 @param index [Integer] Position in the array
 @param value [Integer] value