How to add a CSS class to an render array?
I believe it would be:

$content['field_image'][0]['#attributes']['class'][] = 'my-class';


Or to assign it to every element,

foreach (element_children($content['field_image'] as $key) {
  $content['field_image'][$key]['#attributes']['class'][] = 'my-class';
}