Replaces the element at index with value.
the zero-based element index.
the new element.
if index is negative or is at least size.