Save data from a checkbox to a wpdb array

This isn’t a WordPress question this is a PHP question. Your foreach loops through all the $checkboxes putting one in the $check variable each time, so your insert() call only inserts the last value for $check, because it’s not inside that foreach loop.

You probably want:

global $wpdb; 
foreach( $checkboxes as $check ) {
    $wpdb->insert('data',array('fruit' => $check));
}