Brute force and a loop seems to be the only way to do it inside the PLC.
You will have to to a FSC to detect "sameness" of element 1 to elements 2 to 499, then element 2 to elements 3 to 499, etc., etc.
That is going to take a considerable amount of coding and processor time.
Do you need the result every scan?
How often does this test need to be performed?
Do you need to know all locations where duplicates exist? or just to know that there is at least one? (i.e. correcting the first duplicate will reveal the next, etc.)
Are all the strings the same length? (Some pre-sorting may make the task easier if not)