the same input array but filtered to remove elements which appear only once.
Given an array of any type, return a copy of the same array but filter out any items which only appear once. The comparison uses conversion-to-string, then matching to compare, so this works for primitives (bool, number, string), not objects or arrays.
[1,2,3,2,1] will result in [1,2,2,1]
an array of any type.