How create form elements in form theme hook I have a custom module with a from, form submit handler and for theme hook

In some case I need to create multiple form elements (textfields for example with name like "user_input_1"-"user_input_n")

What I did is change $form array in form theme hook and render new elements. But these elements are missing in the post and form submit processing form (even if shown on a page). I realize what it might be not appropriate way of creating new form elements in theme hook OR maybe there is something(function) what will allow me to properly prepare new form elements in theme hook on a fly.

Or maybe there is another way as I know how many elements do I need in submit processing function which rebuild the form and doing something like $form_state['storage']['wizard_step'] = 'step3' (multi-step form). But I don't know drupal very well, just started..

Stuck and spend few hours trying to find appropriate way of solving this. Any help appreciated.
Thanks
Answer is simple: form alter hook allows to manage form content on a fly