yes, there's a script - right here
;random loadout
removeallweapons player
#choose
_rnd = random 3
_rnd = _rnd - (_rnd mod 1)
?_rnd==1:goto "loadout_1"
?_rnd==2:goto "loadout_2"
?_rnd==3:goto "loadout_3"
goto "choose"
#loadout_1
player addmagazine "m60"
player addweapon "m60"
player addmagazine "m60"
player addmagazine "m60"
player addmagazine "m60"
player addmagazine "m60"
player addmagazine "m60"
exit
#loadout_2
player addmagazine "m16"
player addweapon "m16"
player addmagazine "m16"
player addmagazine "m16"
player addmagazine "m16"
player addmagazine "handgrenade"
player addweapon "handgrenade"
player addmagazine "handgrenade"
player addmagazine "handgrenade"
player addmagazine "handgrenade"
player addmagazine "handgrenade"
player addmagazine "handgrenade"
exit
#loadout_3
player addmagazine "m16"
player addweapon "M16GrenadeLauncher"
player addmagazine "m16"
player addmagazine "m16"
player addmagazine "m16"
player addmagazine "GrenadeLauncher"
player addmagazine "GrenadeLauncher"
player addmagazine "GrenadeLauncher"
exit
i think that's right.
as for keeping the weapon randomly chosen after a restart, i doubt it. after a save, yes. after a restart of mission, probably not, as the script will be called on initialisation.