Unlimited TextFields with Form API
This is not a form API level feature, it's field/widget API.

For a custom form, you have to build it yourself with an add more button that uses #ajax to add more elements. A full code example would be too complicated for an answer, but you have to keep track of the count in $form_state, on pressing of the button increaes it, rebuild the form and then return the new elements.

See https://api.drupal.org/api/drupal/core%21core.api.php/group/ajax/8.2.x for more documentation, a quick tutorial that I found: https://www.sitepoint.com/using-ajax-forms-drupal-8/