You can use wait(s) in loops, if you are using a unique variable for the loop (not IntegerA/B), that isn't used in any other triggers.
You can NOT use wait's only in "pick all units in group and do actions". This is another kind of loop tho.
If you want to use wait in the 2-nd kind of loop - you could do something like this:
loop:
do some actions
set Temp_Unit = Picked Unit
run trigger 2 (checking conditions)
trigger 2:
local unit u = udg_Temp_Unit (this is done via custom script)
wait (the amount you want)
set udg_Temp_Unit = u (this is also done via custom script)
do the rest of the actions you want.
(This is one of the ways to do in in GUI, but doing it in JASS is easier)