Hi,
Im not sure that you can make a template operator that takes more than one param. However I used the php function shuffle(array) instead of rand. Since it only takes one param its easy to make the template operator.
Shuffle is good for instance if you want to select a random article. Then you can fetch articles to an array and run your template operator shuffle on it, like:
$myArticle=$arrMyArticles|shuffle
This will give you one of the articles (randomly selected).
Of course, this only replaces the need for random numbers in certain cases.
Indeed, the template.ini operators can only map to functions that take 1 argument. If you need more, you will have to write a new template operator as an extension. It is not so difficult: take a look at the contributions and the RAD tool in the admin interface.