Twenty Seventeen Pages Loop

The page selection is set within the Customizer under Theme Options, which will only show when front page is set to static.

The output happens within the function twentyseventeen_front_page_section in the theme file template-tags.php, where each panel is queried individually with get_post, so it’s not exactly a loop in the conventional sense.

You can change the number of sections from the default 4 with the twentyseventeen_front_page_sections filter, which should return the number of desired sections.

To access the values via code, you can use get_theme_mod, each panel is stored under the key panel_$i, where $i is the section number, starting at 1. The stored value is the ID of the page. You can also update these values with set_theme_mod.