In Drupal 7 there was option to have fieldset collapsible or not, and to restrict default state of this form element (collapsed, or uncollapsed). Example:
$form['contact_data'] = array( '#title' => t("Contact data"), '#type' => 'fieldset', '#collapsible' => TRUE, '#collapsed' => FALSE, );
Now, in Drupal 8 I cannot find attributtes
Drupal\Core\Render\Element\Fieldset. In official documentation of Fieldset element is not mentioned any new element, which should substitute the Fieldset element.
Also there is not Form API elements overview for Drupal 8, such as for Drupal 7. You have to manually search for all Render Elements definition in code, which is more time consuming (especially when you would like to see elements overview and compare them).