You usage of the mixin will work and although it is not pretty there is not much else that can be done as far as valid LESS / CSS output.
I've written up an example of complex mixins like below. https://codereview.stackexchange.com/questions/140446/less-lazy-mixin-for-element-width-height-float
As well as one that might be on track with what you are trying to accomplish. http://stackoverflow.com/questions/39338429/less-outputs-extra-semicolonhttps://stackoverflow.com/questions/39338429/less-outputs-extra-semicolon
Keep in mind that this using a JavaScript array in a hacky type mannor and the output would still need to be sanitized of the extrenious code that is not valid. But I think we are both headed in the same direction.