Compare each element in an array with every other element in the array.