Convert lots of arrays to lists, and lists to immutable lists.
Fix bugs introduced by the change that deferred computing physical type until implement-time.