Bidirectional maps https://en.wikipedia.org/wiki/Bidirectional_map has extra variants:
- Bimap (key to single value, value to single key)
- Multivalued Bimap (key to multiple values, value to single key)
- Multikeyed Bimap (key to single value, value to multiple keys)
- Multikeyed Multivalued Bimap (key to multiple values, value to multiple keys)
Note that making array keys or array values are totally orthogonal to this system. Any "claimed" multimap that uses array keys or array values has nothing to do with this idea.
Although you can definitely make the value an array, it just means that the array is considered the value, not the individual elements.
Example implementation: https://codereview.stackexchange.com/questions/85842/a-dictionary-that-allows-multiple-keys-for-one-value this does Multikeyed Multivalued Bimap and https://stackoverflow.com/a/21894086/582917 which extends the bidict with multikeyed capability.
Note that the whole idea is that with multikeyed multivalued bimap, you can create a simple relational database table in-memory.
Ordering of the bimap variants depends on the underlying datastructure that is used to implement them. Remember you may want insertion order of keys or insertion order of values, or underlying order of the key, or underlying order of the value or some combination of orders.