How to add checkbox with multiple values in table?

The WordPress function checked() just compares two given values and – if the comparison is true – adds the checked attribute to a radio button or checkbox. The second parameter is default true so you can use the PHP function in_array() if you have to check if a given value is in an array like this

<input type="checkbox" name="selection[]" value="1" <?php checked( in_array( '1', $item['selection'] ) ); ?> />
<input type="checkbox" name="selection[]" value="2" <?php checked( in_array( '2', $item['selection'] ) ); ?> />
<input type="checkbox" name="selection[]" value="3" <?php checked( in_array( '3', $item['selection'] ) ); ?> />

I assume that you saved your data serialized and that you unserialize them before you use them like in the example.

When you submit the form you can get and serialize the value of the field for saving it into the db like this

$str = maybe_serialize( $_POST['selection'] );

When you then get it from the database you should unserialize the value

$item['selection'] = maybe_unserialize( $str );

This is important because just in this way you can restore the array.