Good stuff! As long as we remember that arrays are zero-based, replacing an element is easy.
Are you sure that this is the zero-based index of the fourth element?