add variable to process_page($vars) in form function
It seems to me that you are talking about two different things: altering form fields vs. modifying the $variables array in page.tpl.php.

1) When you say "form creation function", what I hear is that you want to change fields in an existing form. For this, you would want to implement hook_form_alter(). If you want to learn more about how to structure a form, visit the Form Generation page in the Drupal API. 

2) If actually you meant that you want to add or change variables in your page.tpl.php file, then you'll want to implement hook_preprocess_page().