Also for what it's worth -- KM has changed a bit since many of the posts above were made. And a big change was the ability to use \n
as a custom array delimiter.
So to display a random line from the variable Local_lines
it's as simple as:
%Variable%Local_lines[RAND(1,LINES(%Variable%Local_lines%))]\n%
Demo: Random Line.kmmacros (2.6 KB)