Or you can do something along the lines of this:
private _unitBlacklist = ["SOME_CLASS", "ANOTHER_CLASS"];
private _vehicleBlacklist = ["SOME_CLASS", "ANOTHER_CLASS"];
private _excludeGroups = [];
private _excludeVehicles = [];
{
private _group = _x;
{
private _unit = _x;
if (typeOf _unit in _unitBlacklist) exitWith {
_excludeGroups pushBack _group;
};
} forEach (units _group);
} forEach allGroups;
{
private _vehicle = _x;
if (typeOf _vehicle in _vehicleBlacklist) then {
_excludeVehicles pushBack _vehicle;
}
} forEach vehicles;
private _groups = allGroups - _excludeGroups;
private _vehicles = vehicles - _excludeVehicles;
[false, _groups, _vehicles] call ALIVE_fnc_createProfilesFromUnitsRuntime;
Should put you in the right direction. :)