How to add unique class to each checkbox elements
I think the Form Options Attribute module will solve this for you.  It allows you to add option attributes in the form element render array.  Below is the example from the module page.  It also supports checkboxes as well.

$form['states'] = array(
  '#type' =&gt; 'select',
  '#title' =&gt; t('States'),
  '#options' =&gt; array(
    'AL' =&gt; t('Alabama'),
    'AK' =&gt; t('Alaska'),
    'AZ' =&gt; t('Arizona'),
    'AR' =&gt; t('Arkansas'),
    // ..
    'WI' =&gt; t('Wisconsin'),
    'WY' =&gt; t('Wyoming'),
  ),
  '#options_attributes' =&gt; array(
    'AL' =&gt; array('class' =&gt; array('southeast'), 'data-bbq-meat' =&gt; 'pork'),
    'AK' =&gt; array('class' =&gt; array('non-contiguous'), 'data-bbq-meat' =&gt; 'salmon'),
    'AZ' =&gt; array('class' =&gt; array('southwest'), 'data-bbq-meat' =&gt; 'rattlesnake'),
    'AR' =&gt; array('class' =&gt; array('south'), 'data-bbq-meat' =&gt; 'beef'),
    // ...
    'WI' =&gt; array('class' =&gt; array('midwest'), 'data-bbq-meat' =&gt; 'cheese'),
    'WY' =&gt; array('class' =&gt; array('flyover'), 'data-bbq-meat' =&gt; 'bison'),
    ),
  '#attributes' =&gt; array('class' =&gt; array('states-bbq-selector')),
);