Typescript Get First From Array To Hashmap Vs Map