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
import java.util.Map;
import static java.util.Collections.emptyMap;
import static java.util.Collections.singletonMap;
import static org.elasticsearch.painless.action.PainlessExecuteAction.TransportAction.innerShardOperation;
import static org.hamcrest.Matchers.equalTo;
public class PainlessExecuteApiTests extends ESSingleNodeTestCase {
    @Override
    protected Collection<Class<? extends Plugin>> getPlugins() {
        return Collections.singleton(PainlessPlugin.class);
    }
    public void testDefaults() throws IOException {
        ScriptService scriptService = getInstanceFromNode(ScriptService.class);
        Request request = new Request(new Script("100.0 / 1000.0"), null, null);
        Response response = innerShardOperation(request, scriptService, null);
        assertThat(response.getResult(), equalTo("0.1"));
        Map<String, Object> params = new HashMap<>();
        params.put("count", 100.0D);
        params.put("total", 1000.0D);
        request = new Request(new Script(ScriptType.INLINE, "painless", "params.count / params.total", params), null, null);
        response = innerShardOperation(request, scriptService, null);
        assertThat(response.getResult(), equalTo("0.1"));
        Exception e = expectThrows(ScriptException.class, () -> {
            Request r = new Request(
                new Script(ScriptType.INLINE, "painless", "params.count / params.total + doc['constant']", params),
                null,
                null
            );
            innerShardOperation(r, scriptService, null);
        });
        assertThat(e.getCause().getMessage(), equalTo("cannot resolve symbol [doc]"));