When creating a content type programmatically, is there a way to add tuples (e.g. pairs) of fields? In Drupal 7, I'd like to create a Person content type. A person may have multiple profiles - an administrator should be able to select which profile will be considered the primary one. So, that means that I need a tuple consisting of:

A textarea, for the profile text
A checkbox, indicating that this is the primary profile
A textbox, for naming this particular profile

I need functionality to behave like that of any of the lists: I can click "Add another Item", and a set of all three of these fields will appear.

I have a vague idea of how this can be executed, but it involves using the form API to add fields before the form renders each time, as well as the necessary AJAX behavior. This seems a bit overcomplicated, since this would also necessitate creating an additional DB table to hold these tacked-on fields.

Is there a relatively simple way of doing this solely through hook_install()?
The profile2 might fit your bill:


  Profile2 allows for creating multiple profile types, which may be
  assigned to roles via permissions (e.g. a general profile + a customer
  profile)