Values missing in $form_state inside form function but available in ajax callback
It seems you are a bit confused about how the form API works. What you are seeing is exactly as expected. I'll try to explain about how the form API works.

The ajax callback is called in a context of the form being submitted, which is why, all of the form values are passed along, the actual form function is called in the context of being initialized where no form values exist.

There are different ways of structuring ajax. One way could be to add another input like what's possible with fields that can hold many values. In that case, the ajax callback function should only worry about a subset of the form, and return this (You shouldn't call render inside ajax callbacks).

Another way to use ajax is to restructure the entire form. In that case, what you can do, is to set

$form_state['rebuild'] = TRUE;


Which will force Drupal to rebuild the entire form, with the current values and make it possible to fx create a multistep form. This can be done both with and without AJAX.

It sounds like you will need to rebuild the form, to get $form_state values into the form function. Then you can add ajax behavior to the form, where you get this working.