In Drupal 7, field_attach_prepare_view() and field_attach_view() were the generic functions in charge of running field formatters to generate the output for the field values of an entity. Fieldable entity types had to take care of calling them in their "display" API function (node_view(), taxonomy_term_view()...).
The generated render arrays could be altered with hook_field_attach_view_alter().
In Drupal 8, this output is generated by build() / buildMultiple() methods on the EntityViewDisplay object that also holds the display settings for the various components in the entity.
Those methods are called by the "entity view builder" for the entity type, and the default EntityViewBuilder implementation takes care of figuring the correct EntityViewDisplay object and calling the methods appropriately.
The generated render arrays can be altered with hook_entity_display_build_alter().
field_attach_prepare_view(), field_attach_view() and hook_field_attach_view_alter() have been removed.
Drupal 7
field_attach_prepare_view($entity_type, $entities, $view_mode);
$build = field_attach_view($entity_type, $entity, $view_mode);
Drupal 8
$display = EntityViewDisplay::collectRenderDisplay($entity, $view_mode);
$build = $display->build($entity);