Update the `layers.idx` format so that it is more compact and can be parsed by third-parties as YAML. Closes gh-20860