VishwasGagrani Layoutgroup knows the layout it has
It can take the responsibility of looping through the children and assigning the values.
While this might be technically possible for the layouts that are included with Feathers UI, I designed the framework to allow people to create completely custom layouts too, and those custom layouts should support their own layout data classes that can have properties that may not be supported by other layouts. I would prefer if custom layouts and built-in layouts are treated equally, so built-in layouts should not get special treatment.
Don't get me wrong. I see the value of your suggestion. Over the years, I have had to help a few people who had accidentally used the wrong layout data class. There's no error or warning when you choose incorrectly, which I admit isn't ideal. I'll think about it some more. Perhaps I could consider adding a define where you can enable a stricter mode that immediately throws an error when an incompatible layout data is used.
On the other hand, I mentioned custom layouts above. You could get exactly what you want by creating your own custom layout classes where you copy the code from HorizontalLayout and VerticalLayout, and them modify them to use a different, shared ILayoutData implementation that you create.