Zygorithm ... I'm not sure why you would have to sort the data if you just want to compare lists. For example, if you want to see if all elements in ListB are in ListA, just do a loop against ListB and then find() against ListA using loopindex .... Something like this:
add global variable "ListContainsAll" = "true"
add system loop For "ListCompare" from 1 to tokencount(listB, "," ) [assumes your list delimiter is a comma]
add sub event condition compare two values: find(ListA, tokenat( ListB, loopindex("ListComapre"), ",") ) = -1 --> set ListContainsAll ="false"
If you run the above and all elements in ListB are in ListA, you should end up with "ListContainsAll" still true, otherwise false.