Hi @semanalitics
The string you are referring to is a serialized array. You can first create an array of ID’s, and then save the array to the DB via the update_postmeta function will will serialize the array for you!
You can also make use of the handy update_field
function here:
http://www.advancedcustomfields.com/resources/functions/update_field/
Thanks
E