add by-value comparison of array elements