The \Drupal\system\Form\SiteInformationForm class extends \Drupal\Core\Form\ConfigFormBase to handle the writing of form elements as individual configuration values. However, it does not write the values automatically to the form state. In this recipe, we needed to add a submit handler to manually save our added field via a procedural function in our mymodule.module file.
The form array is passed by reference, allowing modifications to be made in the hook to alter the original data. This allows us to add an element or even modify existing items, such as titles or descriptions.