How to add custom class to a  fileds on the renderable array of user_profile_form
You can do it 2 ways. One is to modify the element attributes, like this:

$form['textfield'] = [
  '#type' =&gt; 'textfield',
  '#attributes' =&gt; [
    'class' =&gt; [
      'ul',
    ]
  ],
];


Or, another way, wrap the elements with '#prefix' and '#suffix'.

$form['textfield'] = [
  '#type' =&gt; 'textfield',
  '#prefix' =&gt; '&lt;div class="ul"&gt;',
  '#suffix' =&gt; '&lt;/div&gt;',
];


I would use the first preferably when I can.