Expand semantics of Array from MutableSequence to MutableMapping
An Array is essentially a mux, and there are several equally valid ways to drive a mux. Currently only straight binary is supported. It would be nice to also have one-hot and priority encodings, since all of these are trivially representable directly in RTLIL and Verilog.
One thing to note is that one-hot and priority are one and the same unless parallel_case is used.
The most idiomatic way to do this is to make the Array associative, and make sure that initializing it with a list uses consecutive indices. (The indices still all have to be integers; possibly enums?)
This is a self-contained feature that doesn't have backwards compatibility concerns, so it doesn't have to be in 0.1.