Since Symfony 5.3 there exist a new way of configuring packages. The config builders:
https://symfony.com/blog/new-in-symfony-5-3-config-builder-classes
It would be great as we are currently having done the step from yaml to php configs. To do the next step from PHP array configs to PHP config builder configs.
Not sure how easy possible without knowing the Builder class and only the array this is even possible.