$s = 0;
foreach($states as $state):
$list[$s]->id = $state;
$list[$s]->name = $state;
$s++;
endforeach;
Now we have the list like we need it to be. Now on to the creating of the select list!
$default = 'NC';
$field = 'state';
$options = array();
foreach($list as $value):
$options[] = JHTML::_('select.option', $value->id, $value->name);
endforeach;
$select = JHTML::_('select.genericlist', $options, $field,
'class="inputbox"', 'value', 'text', $default);
As you see above, a variable for $default and $field. This is more if you want to set this in a function and have those variables passed into that function. I do it that way and it is the best way to go about using this, just create a creatSelect() function in your Model or Controller and you are good to go for the whole component! Saves lots of time, and only needs to be written once.
I set up the function to require 3 variables ($list, $default, $field).