D7: How to loop an array as form elements?
For those of you who face the same issue: I found the answer:

foreach($jcartItemName as $key =&gt; $value) { 
$form['jcartItemName'][$key] = array(
'#type' =&gt; 'textfield',
'#value' =&gt; isset($value) ? $value : '',
);