In houdini it is posslible to create a for loop to repeat functions easily, is this possible in geometry nodes? the setup below is my current solution,its extremely messy and not very scalable has anyone found a better solution to this problem?
It is not possible to create loops in Blender Geometry Nodes. That is probably the #1 wished for addition to geometry nodes at this time. There is a better solution for many problems that uses an instances on points node to create the duplication. Here is a rough example:
The mesh line is used to generate a number of points, its count value. It can also be modified by a Set Position node to control the locations. Many other nodes or node groups can substitute depending on your need.
The key is the instance input to the Instances on Points node. Not shown in this picture, whatever feeds it is the geometry you want to repeat. That's usually replaced by whatever geometry you want to repeat.
There are similar approaches for other looping-like constructs. They rely on the fact that 3.x Geometry Nodes uses fields and you can set up the contents of a field as if it were your loop variable and then modify it with nodes like Instance on Points