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/main/java/org/elasticsearch/painless/action/PainlessExecuteAction.java
private static final ParseField INDEX_FIELD = new ParseField("index");
            private static final ParseField DOCUMENT_FIELD = new ParseField("document");
            private static final ParseField QUERY_FIELD = new ParseField("query");
            private static final ConstructingObjectParser<ContextSetup, Void> PARSER = new ConstructingObjectParser<>(
                "execute_script_context",
                args -> new ContextSetup((String) args[0], (BytesReference) args[1], (QueryBuilder) args[2])
            );
            static {
                PARSER.declareString(ConstructingObjectParser.optionalConstructorArg(), INDEX_FIELD);
                PARSER.declareObject(ConstructingObjectParser.optionalConstructorArg(), (p, c) -> {
                    try (XContentBuilder b = XContentBuilder.builder(p.contentType().xContent())) {
                        b.copyCurrentStructure(p);
                        return BytesReference.bytes(b);
                    }
                }, DOCUMENT_FIELD);
                PARSER.declareObject(
                    ConstructingObjectParser.optionalConstructorArg(),
                    (p, c) -> AbstractQueryBuilder.parseTopLevelQuery(p),
                    QUERY_FIELD
                );
            }
            private final String index;
            private final BytesReference document;
            private final QueryBuilder query;
            private XContentType xContentType;
            static ContextSetup parse(XContentParser parser, Void context) throws IOException {
                ContextSetup contextSetup = PARSER.parse(parser, null);
                contextSetup.setXContentType(parser.contentType());
                return contextSetup;
            }