This seems to have similarity with this previous proposal. As suggested on that discussion, using the default_proc functionality of Ruby to auto-create nested hashes seems to offer similar benefits without anything new.
As to your map_by_key that seems to be doing the same thing as Ruby built-in group_by function. And your uniq_map_by_key seems like the same as the ActiveSupport’s built-in index_by function.