What's the correct way to add attributes to a Link field?
There were some close ones, but this is the correct way to set an attribute to the first link:

function mymodule_preprocess_field(&amp;$variables) {
  if ($variables['field_type'] == 'link') {
    $variables['items']['0']['content']['#attributes']['target'] = '_blank';
  }
}