Implement ucl_array_replace_index()

Overwrite the indicated array index with a new value, keeping its position in the array
There is no DL_INSERT, but I found DL_REPLACE_ELEM which seems to make the most sense in this case.

Changed the return value to be the element being replaced (so it is similar to array_delete etc)