This following code works, except that the first random is always the same (Analysis) for some reason.
\enableregime[il1]
\starttext
\startluacode
userdata = userdata or {}
math.randomseed( os.time() )
function userdata.random(...)
context(arg[math.random(1, #arg)])
end
\stopluacode
\def\CHOOSERANDOM#1{\ctxlua{userdata.random(#1)}}
\dorecurse{10}{\CHOOSERANDOM{"Maths", "Physics", "Algebra", "Analysis", "Chemistry", "Geometry", "Wave equation", "Schrödinger equation"}\par}
\stoptext