It would be pretty straightforward to parametrize those functions so you could fizz buzz on any numbers, not just 3 and 5. Or is that not what you meant? You want a system that can solve any problem? Then you’re looking at a computer algebra system. SageMath [1] is a nice one.
[1] https://www.sagemath.org/