HTML table in a render array? I dislike the notion of using something like this since it may mean I have to commit my table data straight to HTML sooner than I want to:

$render_array = array(
    'maintable' =&gt; array(
        '#markup' = theme_table($table)
    ),
    ...
);


Do I have an option to pass the table data into the render array (as opposed to rendering it immediately to HTML), by chance?
$render_array['maintable'] = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; $header,
  '#rows' =&gt; $rows,
);