How to add an element into a nested array in twig?
I managed to solve the problem via hook_preprocess.
Here's the code


function mytheme_preprocess_table__forum_topic_list(&$vars){
    $vars['header'][0]['attributes']->addClass(['col-xs-9', 'col-sm-6']);
    $vars['header'][1]['attributes']->addClass(['col-xs-3', 'col-sm-2']);
    $vars['header'][2]['attributes']->addClass(['hidden-xs', 'col-sm-4']);

    $vars['rows'][0]['cells'][0]['attributes']->addClass(['col-xs-9', 'col-sm-6']);
    $vars['rows'][0]['cells'][1]['attributes']->addClass(['col-xs-3', 'col-sm-2']);
    $vars['rows'][0]['cells'][2]['attributes']->addClass(['hidden-xs', 'col-sm-4']);
}