Spot on. We use ytt[0], "a slightly modified version of the Starlark programming language which is a dialect of Python". Burying logic somewhere in a yaml template is one thing I dislike with passion.
TBH, ytt is the only yaml templating approach that I actually like.
The downside is that it is easy to do dumb things and put a lot of loops in your yaml.
The positive is that it is pretty easy to use it like an actual templating language with business logic in starlark files that look almost just like Python. In practice this works pretty well.
The syntax is still fairly clumsy, but I like it more than helm.
[0] https://tanzu.vmware.com/developer/guides/ytt-gs/