Create Map From Array Javascript Methods