How to check all checkboxes that are in same array?

How to check all checkboxes that are in same array?

Hey.. I'm new to Jquery and could use some help.. 
The problem is next: I have a foreach loop that is going trow the array of rows in table..Now when I check one check box, the other checkboxes needs to be checked, that are in the same array. I hope that I made myself clear. 

Here is the table >>

SERIJSKI BROJ
222222226
555555555
555555556
555555557
666666666
666666667
777777777

Here is the code >>

<div class="col-md-6">
<table id="tabela_zaduzi_plombe" class="table-responsive table table-bordered dataTable no-footer font-size-13">
  <thead>
    <tr class="boja-reda">
      <th class="align-center width-50"></th>
      <th class="align-center width-50"></th>
      <th class="width-300"><?php echo __("SERIJSKI BROJ");?></th>

    </tr>
  </thead>
  <tbody>
<?php
  $index = 0;
  $colors = array('#f7f3e1','#e8e4cf','#f1f6f0', '#f7e4c1', '#e2e1d7');
     foreach($lista_slobodnih_plombi as $key=>$lista_sp):
       $color = $colors[($index) % count($colors)];
       $broj_redova = count($lista_sp) + 1; ?>


      <td class="first_td align-middle align-center" bgcolor="<?php echo $color;?>" rowspan="<?php echo $broj_redova; ?>"><input type="checkbox" class="grupni_check" checked="true"/></td>
      <?php  foreach($lista_sp as $lista): ?>

      <tr bgcolor="<?php echo $color;?>">
        <td class="align-center td_checkbox"><input type="checkbox" name="link-cbx" class="checkItem" id="<?php echo $lista; ?>" data-sb_plombe="<?php echo $lista; ?>" /></td>
        <td class="sbr"><?php echo $lista; ?></td>

      </tr>

      <?php endforeach;
  $index++;
     endforeach; ?>
  </tbody>
</table>
</div>

And this is array>>

array(
	(int) 0 => '222222226'
)

array(
	(int) 0 => '555555555',
	(int) 1 => '555555556',
	(int) 2 => '555555557'
)

array(
	(int) 0 => '666666666',
	(int) 1 => '666666667'
)

array(
	(int) 0 => '777777777'
)

Thanks unadvanced!