(#20684) Add array comparison functions, difference, intersection and un...

...ion.

Included is code, tests and documentation for the difference, intersection
and union functions for comparing arrays.