In the field ui, we can create a textfield with unlimited values. Which has button of add another, which when clicked added another field with a remove button.
Here is a nice article on how to do it using Form API http://rapiddg.com/blog/use-ajax-support-multiple-item-values-custom-drupal-7-forms
Hope this helps.
Use Ajax. Here you have an example where an Ajax action will change the values of a select field.
You can adapt the code in order to add fields instead of just replacing them. The method would be similar to that done with simple pure AJAX, but you will benefit from using the Drupal FORM API.