Add API to map chunk indices
Because some channels can have mappings (e.g. one value per trace), the number of chunks can be less than in the primary channel and we need to have a mapping to figure out the chunk index in each channel that is produced together.