Exposed filter in view should display all available values in select box
A little bit more research would have helped, I found out myself how to do this. (Though I don't know if it would work without custom code.)
I hooked into hook_form_FORM_ID_alter() inside my theme (would also work in a custom module) and altered the form like this:
function MYTHEME_form_views_exposed_form_alter(&amp;$form, &amp;$form_state, $form_id) {
  if ($form['#id'] == 'views-exposed-form-MYVIEWID-MYFORMID') {
    $nids = \Drupal::entityQuery('node')-&gt;condition('type', 'article')-&gt;execute();
    $nodes = \Drupal\node\Entity\Node::loadMultiple($nids);
    $options = ['' =&gt; 'All'];

    foreach($nodes as $nid =&gt; $node) {
      $value = $node-&gt;get('field_article_year')-&gt;getString();

      if (isset($value)) {
        $options[$value] = $value;
      }
    }

    asort($options, SORT_NUMERIC);

    if (isset($form['article_year'])) {
      $form['article_year']['#type'] = 'select';
      $form['article_year']['#options'] = $options;
      $form['article_year']['#size'] = 1;
    }
  }
}