Rewrite ucl_array_replace_index()
Use DL_FOREACH_SAFE and DL_REPLACE_ELEM