Q:

radios options separated into different wrappers

I'm trying to customize a radios field to wrap some of the options into a div.
What the best way to do it?
I had a look to theme_radio but no success on it :(
example:
<div id="part1">
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
</div>

<div id="part2">
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
</div>

<div id="part3">
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
  <div class="form-item form-type-radio form-item-SOME_ID">
    <input id="edit-SOME_ID" class="form-radio" type="radio" value="SOME_VALUE" name="SOME_NAME" /> 
    <label class="option" for="edit-bla-bla">MY LABEL</label>
  </div>
</div>

ANSWER:
See Djouuuuh answers + 
$output .= drupal_render($element['element'][$i]);

if you do this one below it won't work with ajax...
$output .= theme('radio', $element['element'][$i]);

A:

In my opinion you can achieve that with a theme function, specified like this:
$element['example'] = array(
  '#type' => 'checkboxes',
  '#title' => t('Example checkboxes'),
  '#options' => $options,
  '#theme' => array('custom_options'),
);

And then, you can write down the output just as you want here:
function theme_custom_options($element) {
  $output = '<div id="blah">';
  $output .= $element['#options'][0];
  $output .= $element['#options'][1];
  $output .= '</div><div id="blablah">';
  $output .= $element['#options'][2];
  $output .= $element['#options'][3];
  $output .= '</div>';
  // ETC...
  return $output;
}

Does it seem correct?

