Sets the element at the supplied index to the supplied value
an index into the array
the value to set