Producing collapsible field sets with theme functions
You can call theme_fieldset() directly, even if it's not for a form, as long as you structure the $element correctly:
https://api.drupal.org/api/drupal/includes!form.inc/function/theme_fieldset/6

You can see an exemple in core here:
https://api.drupal.org/api/drupal/modules!system!system.admin.inc/function/theme_system_modules/6

$fieldset = array(
  '#title' =&gt; t($package),
  '#collapsible' =&gt; TRUE,
  '#collapsed' =&gt; ($package == 'Core - required'),
  '#value' =&gt; theme('table', $header, $rows, array('class' =&gt; 'package')),
);
$output .= theme('fieldset', $fieldset);


theme_fieldset() is also valid in Drupal 7, but it seems to have changed in Drupal 8.