Update RandomUtil.php

Minor API fixes to make things more flexible. 

Q	A
Bug fix?	no
New feature?	yes
BC breaks?	no
Deprecations?	no
Tests pass?	--
Fixed tickets	
License	MIT
Doc PR	--