In general, where you want to use the API to 'update' an existing element by adding/removing one or more items in it, the method to use is...
Read the value of the element into a local variable.
Make the required changes to that local copy.
Write the updated element value back.