As of M5.1, all parameters are val and cannot be modified. If you want a mutable, you have to declare it explicitly in the body of the function.
Unfortunately, there’s no such thing as “passing parameters as var”. The only way of passing parameters on the JVM/JS is by value (when you pass an object reference the value of the reference is passed).
Theoretically, we could implement C#-liek out-parameters by boxing values, but this is costly and largely pointless. Use data classes to return multiple values from a function.