### Elasticsearch Version

master

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

all

### Problem Description

cat indices API in time_series mode is NPE, The reproduce steps is below:

### Steps to Reproduce

```
# step 1
PUT _index_template/test
{
  "index_patterns": [
    "test"
  ],
  "template": {
    "settings": {
      "index.routing_path": "foo"
    },
    "mappings": {
      "properties": {
        "foo": {
          "type": "keyword",
          "time_series_dimension": true
        }
      }
    }
  },
  "data_stream": {
    "index_mode": "time_series"
  }
}

# step 2
PUT _data_stream/test

# step 3
GET _cluster/state/metadata/test
GET _cat/indices/test?v
```
server/src/main/java/org/elasticsearch/cluster/metadata/DataStream.java
args[6] != null && (boolean) args[6],
            args[7] != null && (boolean) args[7],
            args[8] != null && (boolean) args[8],
            args[9] != null ? IndexMode.fromString((String) args[9]) : null
        );
    });
    static {
        PARSER.declareString(ConstructingObjectParser.constructorArg(), NAME_FIELD);
        PARSER.declareObject(ConstructingObjectParser.constructorArg(), TimestampField.PARSER, TIMESTAMP_FIELD_FIELD);
        PARSER.declareObjectArray(ConstructingObjectParser.constructorArg(), (p, c) -> Index.fromXContent(p), INDICES_FIELD);
        PARSER.declareLong(ConstructingObjectParser.constructorArg(), GENERATION_FIELD);
        PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), (p, c) -> p.map(), METADATA_FIELD);
        PARSER.declareBoolean(ConstructingObjectParser.optionalConstructorArg(), HIDDEN_FIELD);
        PARSER.declareBoolean(ConstructingObjectParser.optionalConstructorArg(), REPLICATED_FIELD);
        PARSER.declareBoolean(ConstructingObjectParser.optionalConstructorArg(), SYSTEM_FIELD);
        PARSER.declareBoolean(ConstructingObjectParser.optionalConstructorArg(), ALLOW_CUSTOM_ROUTING);
        PARSER.declareString(ConstructingObjectParser.optionalConstructorArg(), INDEX_MODE);
    }
    public static DataStream fromXContent(XContentParser parser) throws IOException {
        return PARSER.parse(parser, null);
    }
    @Override
    public XContentBuilder toXContent(XContentBuilder builder, Params params) throws IOException {
        builder.startObject();
        builder.field(NAME_FIELD.getPreferredName(), name);
        builder.field(TIMESTAMP_FIELD_FIELD.getPreferredName(), TIMESTAMP_FIELD);
        builder.xContentList(INDICES_FIELD.getPreferredName(), indices);
        builder.field(GENERATION_FIELD.getPreferredName(), generation);
        if (metadata != null) {
            builder.field(METADATA_FIELD.getPreferredName(), metadata);