Rewrite logical combination expression
Use a loop.

flag := false;
for i in 0 to x'high loop
  flag := flag or x(i)(1);
end loop;


If you insist on having flag be a signal, use a function which uses a loop. In fact, always use this function, but also turn flag into a variable.

function or_reduce_index(array : t_flag_array_type,
                         flag_index : natural) return std_logic is
  variable result : std_logic;
begin
  result := false;
  for i in 0 to array'high loop
    result := result or array(i)(flag_index);
  end loop;
  return result;
end;

flag := or_reduce_index(x, 1); -- somewhere else


Flag should probably also be a boolean.