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' => 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?