Enable mapping of ports to subset of array indices; add unit tests for PortMapper class.