There’s no reason a for loop couldn’t be used.  Assuming skip_layers and hourglass_layers contain the necessary modules:
skips = []
for skip_layer, hourglass_layer in zip(skip_layers, hourglass_layers):
    skips.append(skip_layer(input))
    input = hourglass_layer(input)

Do that for the first half of the hourglass, then another for loop for the second half where you combine the output in skips and use that as input for the rest of the “stem” layers.