Type inference for array literals. Program tracks union types. Some other code copied from the generics branch.