How can I get all fields and values of a node at once?
This is how you can add all values in a custom array. The EntityManager class and the entity.manager service are deprecated; you should use the entity_type.manager service instead.

$publications = \Drupal::entityTypeManager()
  -&gt;getStorage('node')
  -&gt;load($node_id);

foreach ($publications-&gt;getFields() as $name =&gt; $field) {
  $myFields[$name] = $field-&gt;getString();
}

kint($myFields);


You need to improve this code because for some field types that can be different. 


For multi-value fields you use $field-&gt;getValue()
For entity reference fields, $field-&gt;entity-&gt;field_name-&gt;value