Typescript Get Elements From Array To Hashmap Vs Set