Very funny you should ask. I've been working on a similar script for the last few days, inspired loosely by savedbygrace's patrol replacement script for Kolgujev Contract. This is how SBG did it:
#patrol1start
_alpha = {alive _x} count units patrol1
? _alpha == 3 : goto "patrol2start"
#create1
_NUMBERS = 20
_NUMB = Random _NUMBERS
?(_numb < 1) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 1) and (_numb <= 2) ) : "soldierElaw" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 2) and (_numb <= 3) ) : "soldierEMG" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 3) and (_numb <= 4) ) : "soldierEG" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 4) and (_numb <= 5) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 5) and (_numb <= 6) ) : "soldierEMedic" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 6) and (_numb <= 7) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 7) and (_numb <= 8) ) : "soldierESniper" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 8) and (_numb <= 9) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 9) and (_numb <= 10) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 10) and (_numb <= 11) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 11) and (_numb <= 12) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 12) and (_numb <= 13) ) : "soldierESniper" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 13) and (_numb <= 14) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 14) and (_numb <= 15) ) : "soldierElaw" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 15) and (_numb <= 16) ) : "soldierEMG" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 16) and (_numb <= 17) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 17) and (_numb <= 18) ) : "soldierEG" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
?( (_numb > 18) and (_numb <= 19) ) : "soldierEMedic" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "corporal"]
?( (_numb > 19) and (_numb <= 20) ) : "soldierE" createUnit [getMarkerPos "PatrolMarker", patrol1,"this AddEventHandler [{Killed},{_this exec {scripts\deletehandler.sqs}}]", 1, "private"]
~.01
goto "patrol1start"
A random number is defined at the beginning, and the created unit type depends on the number.
Of course, you say you need a vehicle, so use createvehicle commands instead of createunit. To name your vehicle, just use code like this
newapc = "M113" createvehicle getpos spawnpoint
Then move some people into this empty vehicle:
loon1 moveInDriver newapc
and tell him to move somewhere
loon1 move getpos player
Does that work?