Enable taxonomies by post type in an array of CPTs

I have tweaked theyour code and it should work.. please give it a try

add_action('init', 'all_custom_post_types');

function all_custom_post_types() {
  $types = array(
        array('the_type' => 'event',
            'single' => 'Event',
            'plural' => 'Events'
        ),
        array('the_type' => 'resource',
            'single' => 'Resource',
            'plural' => 'Resources'
        ),
        array('the_type' => 'team',
            'single' => 'Team',
            'plural' => 'Team'
        ),
  );
foreach ($types as $type) {
    $the_type = $type['the_type'];
    $single = $type['single'];
    $plural = $type['plural'];
    $labels = array(
      'name' => _x($plural, 'post type general name'),
      'singular_name' => _x($single, 'post type singular name'),
      'add_new' => _x('Add New', $single),
      'add_new_item' => __('Add New '. $single),
      'edit_item' => __('Edit '.$single),
      'new_item' => __('New '.$single),
      'view_item' => __('View '.$single),
      'search_items' => __('Search '.$plural),
      'not_found' =>  __('No '.$plural.' found'),
      'not_found_in_trash' => __('No '.$plural.' found in Trash'),
      'parent_item_colon' => ''
    );
    $args = array(
      'labels' => $labels,
      'public' => true,
      'publicly_queryable' => true,
      'show_ui' => true,
      'query_var' => true,
      'rewrite'  => array( 
         'with_front' => false
      ),
      'capability_type' => 'post',
      'hierarchical' => true,
      'has_archive' => true,
      'menu_position' => 5,
      'supports' => array('title','editor','author'),
      'show_in_menu' => true,
      'show_in_nav_menus' => true,
    );

    if($the_type=='resource'){
        $args['taxonomies'] = array( 'category', 'post_tag' );
    }elseif($the_type=="event"){
        $args['taxonomies'] = array( 'post_tag' );
    }else{
    }
    register_post_type($the_type, $args);
  }
}