Typescript Dynamic Type From Array To Hashmap