Off the top of my head, transformations is one of the clearest examples. With Pulumi, you can arbitrarily transform YAML or Helm inputs before deploying those resources.
The examples mentioned in your quote are here:
https://github.com/pulumi/examples/tree/master/kubernetes-ts-staged-rollout-with-prometheus
https://www.pulumi.com/kubernetes/ (Injecting sidecars using abstraction)
The prometheus example runs some imperative code checks as part of the deployment, and the sidecar example uses inheritance to extend the behavior of the base SDK. To the best of my knowledge, TF doesn’t have equivalent capabilities because it uses HCL rather than a full programming language.