The batch editor isn't too "smart"; only a few shortcuts have been added to facilitate complicated actions. However, you can still do what you want if you think a little outside the box!
Assuming you're editing for Gen8+, we can first randomize them to unused ability IDs, then fix them back to their correct ability for the slot.
.Ability=$3000,3002
;
=Ability=3000
.AbilityNumber=$1
;
=Ability=3001
.AbilityNumber=$2
;
=Ability=3002
.AbilityNumber=$4