Drupal Form Checkbox having different name and id (of my choice)
Found answer,
done like this:

$form['wrapper'][$unitClean.'_container'][$unitClean.'_cb'] = array(
                '#type' =&gt;'checkbox', 
                '#title' =&gt; t($unit),
                '#attributes' =&gt; array(
                  'name' =&gt; $unitClean.'_name',
                  'id' =&gt; $unitClean.'_id',
                  'onclick' =&gt; 'checkall();'                 
                    )
                );