Typescript Find Duplicates In An Array Practice