How can I loop through all article content types and get the content of each
you can use 

function YOURTHEME_preprocess_node_article(&amp;$variables){
  $node = $variables['node'];
   $nid = $node-&gt;id();
   // similarly you can fetch other fields
}


then override article content type as node--article.html.twig
and pass data to twig file