function getLayerStatesArray(layers) {
  return layers.map(function (layer) {
    return layer.getLayerState();
  });
}
Get a list of layer states from a list of layers.
@param {Array<import("../layer/Layer.js").default>} layers Layers.
@return {Array<import("../layer/Layer.js").State>} The layer states.