Pass Preprocess Values From Custom Module to Custom Form My use case:

I would like to create a unique textfield per region in a custom form.

MYMODULE/MYMODULE.module:

function MYMODULE_preprocess_region(&amp;$variables) {

    foreach (array($variables['elements']['#region']) as $key) {
        drupal_set_message($key);
    }

}


MYMODULE/src/form/MyModuleForm.php:

protected function getEditableConfigNames() {
    return [
        'module_config.module_config_settings',
    ];
}

public function buildForm(array $form, FormStateInterface $form_state) {

    $config = $this-&gt;config('module_config.module_config_settings');

    //build this...
    $form['region_name'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('Form Item Title),
    );

    return parent::buildForm($form, $form_state);

}


What is the appropriate way to pass variables/info from the .module file to the .form?

*Note: I have a fully functioning form, hopefully I am showing enough of it to illustrate my focus.
It seems that you can get the list of blocks from this answer: How do i get the all the regions available in the current theme programatically?

MYMODULE/src/form/MyModuleForm.php:

protected function getEditableConfigNames() {
    return [
        'module_config.module_config_settings',
    ];
}

public function buildForm(array $form, FormStateInterface $form_state) {

  // Get the block list based on previous Q/A
  $theme = \Drupal::theme()-&gt;getActiveTheme()-&gt;getName();
  $system_region = system_region_list($theme, REGIONS_ALL);

  foreach ($system_region as $region) {
    $form[$region . '_title'] = [
      '#type' =&gt; 'textfield',
      '#title' =&gt; t('Form ' . $region . ' Title'),
    ];
  }

  return parent::buildForm($form, $form_state);
}