Overriding field values in Drupal 8
After doing a quick test, turns out that hook_preprocess_node will always override hook_preprocess_field's attributes.

Therefore, instead of adding the class in hook_preprocess_field, and if you don't want to use '#markup', you could add it in hook_preprocess_node like this:

function THEMENAME_preprocess_node(&amp;$variables) {
    $variables['content']['field_test'] = array(
    '#type' =&gt; 'processed_text', 
    '#text' =&gt; 'Test 123',
    '#prefix' =&gt; '&lt;div class="your-class"&gt;',
    '#suffix' =&gt; '&lt;/div&gt;',
  );
}