Updating a custom field in a custom post type

I’d register a ‘add_meta_box’ to the cpt, the form element will define the custom_field_name and the save action would call update_post_meta.