This is pretty much a solved problem in languages with multiple dispatch (Common Lisp, Julia, Raku etc), the behavior lives in the methods which don't belong to a specific class.
You can sort of, kind of get there with free functions and overloading as long as you're not doing anything fancy with the methods.
You can sort of, kind of get there with free functions and overloading as long as you're not doing anything fancy with the methods.