### Elasticsearch Version

main

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

21.6.0 Darwin Kernel Version 21.6.0: Thu Jul  6 22:18:26 PDT 2023; root:xnu-8020.240.18.702.13~1/RELEASE_X86_64 x86_64

### Problem Description

fields option is not returning values with an array of objects. See example in "Steps to Reproduce". Problem brought up in Kibana SDH https://github.com/elastic/sdh-kibana/issues/4114

### Steps to Reproduce

```
PUT test
{}

PUT test/_mapping
{
  "properties": {
    "results": {
      "properties": {
        "value": {
          "type": "geo_point"
        }
      }
    }
  }
}

PUT test/_doc/1
{
  "results": [
    {
      "value": [
        {
          "lat": 0,
          "lon": 0
        }
      ]
    }
  ]
}


POST /test*/_search
{
  "_source": false,
  "fields": [
    "results.value"
  ]
}
```

In the response, notice how fields is not populated and no value is returned

```
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test",
        "_id": "1",
        "_score": 1
      }
    ]
  }
}
```

I would expect to get a response like 
```
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 1,
    "successful": 1,
    "skipped": 0,
    "failed": 0
  },
  "hits": {
    "total": {
      "value": 1,
      "relation": "eq"
    },
    "max_score": 1,
    "hits": [
      {
        "_index": "test",
        "_id": "1",
        "_score": 1,
        "fields": {
          "results.value": [
            {
              "coordinates": [
                0,
                0
              ],
              "type": "Point"
            }
          ]
        }
      }
    ]
  }
}
```

### Logs (if relevant)

_No response_
server/src/test/java/org/elasticsearch/common/xcontent/support/XContentMapValuesTests.java
map.put("field", "value");
        List<Map<String, String>> array = new ArrayList<>();
        Map<String, String> object = new HashMap<>();
        object.put("exclude", "bar");
        array.add(object);
        map.put("array", array);
        Map<String, Object> filtered = XContentMapValues.filter(map, new String[0], new String[] { "array.exclude" });
        assertTrue(filtered.containsKey("field"));
        assertTrue(filtered.containsKey("array"));
        List<?> filteredArray = (List<?>) filtered.get("array");
        assertThat(filteredArray, hasSize(0));
    }
    public void testEmptyArraySubFieldsExclusion() {
        Map<String, Object> map = new HashMap<>();
        map.put("field", "value");
        List<Map<String, String>> array = new ArrayList<>();
        map.put("array", array);
        Map<String, Object> filtered = XContentMapValues.filter(map, new String[0], new String[] { "array.exclude" });
        assertTrue(filtered.containsKey("field"));
        assertTrue(filtered.containsKey("array"));
        List<?> filteredArray = (List<?>) filtered.get("array");
        assertEquals(0, filteredArray.size());
    }
    public void testEmptyArraySubFieldsInclusion() {
        Map<String, Object> map = new HashMap<>();
        map.put("field", "value");
        List<Map<String, String>> array = new ArrayList<>();
        map.put("array", array);
        {
            Map<String, Object> filtered = XContentMapValues.filter(map, new String[] { "array.include" }, new String[0]);