How can I theme a form element with hook_preprocess_form_element()? I have an exposed form in a D8 view which includes several fields, output through form-element.html.twig (amongst others). I added a function:

function MYTHEME_preprocess_form_element(&amp;$variables) {
...
}


This contains an 'element' key and I could add a class in there, BUT I see no way of identifying which form this is part of. The 'element' has a child '#parents' but this is simply the name of the field. 

The whole point of this is to add some Bootstrap responsive classes to these different form items for layout. I tried template_preprocess_form and while I see the fields listed as elements, I don't see a way to add classes to the form element label.

What is best practice for theming D8 exposed forms?

Update: I used XDebug with PhpStorm to debug both MYTHEME_preprocess_form_element and MYTHEME_preprocess_form and explored the entire tree of $variables but could see nothing hinting at parent form ID or similar.
As @4k4 said, if all you want is to add some classes, then use hook_form_alter() or hook_form_FORM_ID_alter(). $form['your_element']['#attributes']['class'][] = 'your-class is all you need.

I'm pretty sure that single form elements don't have the form ID stored somewhere.