Do you just want to create the fields with empty values, so users can fill in the values themselves? In that case you can just add the fields to your updateprofile chunk and they will be saved automatically.
Or do you want to create the field and save the value at the same time? Then you might hack the database directly.
The extended fields are in a column called ’extended’ in the table [yourprefix]_user_attributes. Extended fields are saved in one field in a array-like format, like so:
{"firstname":"Bas","lastname":"Zijlstra"}
You already have extended fields, so you need to update the values rather than overwrite them. Do something like:
update [yourprefix]_user_attributes set extended = concat(left([yourprefix]_user_attributes.extended, length([yourprefix]_user_attributes.extended) - 1), ',"foo":"bar"', '}') where id = [n]
There may be a simpler way. Also, I’d recommend that you back up your data first!