New array intersection function that sorts values first

Signed-off-by: Jarrod Payne <jpayne@webotomy.com>