Use maps when we sometimes only uses a subset of an array