Trying to hit the [execute API](https://www.elastic.co/guide/en/elasticsearch/painless/8.5/painless-execute-api.html) with an index that in available via cross cluster search will fail with an `IllegalArgumentException`: `Cross-cluster calls are not supported in this context but remote indices were requested`

That is because `PainlessExecuteAction`'s [`TransportAction`](https://github.com/elastic/elasticsearch/blob/8.5/modules/lang-painless/src/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java#L462) is a [`TransportSingleShardAction`](https://github.com/elastic/elasticsearch/blob/8.5/server/src/main/java/org/elasticsearch/action/support/single/shard/TransportSingleShardAction.java#L153) which uses [`IndexNameExpressionResolver.concreteIndices`](https://github.com/elastic/elasticsearch/blob/8.5/server/src/main/java/org/elasticsearch/cluster/metadata/IndexNameExpressionResolver.java#L331), which does not support remote clusters.

What would it take it enable PainlessExecuteAction to support CCS?

Kibana uses the execute api to validate runtime fields on edit, see https://github.com/elastic/kibana/issues/145861
modules/lang-painless/src/test/java/org/elasticsearch/painless/action/PainlessExecuteApiTests.java
emit(ZonedDateTime.parse("1942-05-31T15:16:17Z").toInstant().toEpochMilli());
            emit(ZonedDateTime.parse("2035-10-13T10:54:19Z").toInstant().toEpochMilli());""", emptyMap()), "date_field", contextSetup);
        response = innerShardOperation(request, scriptService, indexService);
        assertEquals(
            Arrays.asList("2021-01-01T00:00:00.000Z", "1942-05-31T15:16:17.000Z", "2035-10-13T10:54:19.000Z"),
            response.getResult()
        );
    }
    @SuppressWarnings("unchecked")
    public void testDoubleFieldExecutionContext() throws IOException {
        ScriptService scriptService = getInstanceFromNode(ScriptService.class);
        IndexService indexService = createIndex("index", Settings.EMPTY, "doc", "rank", "type=long", "text", "type=text");
        Request.ContextSetup contextSetup = new Request.ContextSetup(
            "index",
            new BytesArray("{\"rank\": 4.0, \"text\": \"quick brown fox\"}"),
            new MatchQueryBuilder("text", "fox")
        );
        contextSetup.setXContentType(XContentType.JSON);
        Request request = new Request(
            new Script(ScriptType.INLINE, "painless", "emit(doc['rank'].value); emit(Math.log(doc['rank'].value))", emptyMap()),
            "double_field",
            contextSetup
        );
        Response response = innerShardOperation(request, scriptService, indexService);
        List<Double> doubles = (List<Double>) response.getResult();
        assertEquals(4.0, doubles.get(0), 0.00001);
        assertEquals(Math.log(4.0), doubles.get(1), 0.00001);
        contextSetup = new Request.ContextSetup("index", new BytesArray("{}"), new MatchAllQueryBuilder());
        contextSetup.setXContentType(XContentType.JSON);
        request = new Request(