Implementing a workflow that queries a REST endpoint using entities

1. What is the issue? Please be detailed.
I would like to query ArcGIS layers using Entities in my workflow. This would be a point-in-polygon query. So the user clicks on a map, then a query is made to an ArcGIS layer to get a specific value and populate a field in my form. I could not find examples using ODK, but I came across this workflow supported by Survey123 using pulldata() -

2. What steps can we take to reproduce this issue?
Please have a look at the following demonstration implemented using Survey123
The above link show cases the following workflows:
Point-in-polygon calculations using a map - the user click on a map to get the coordinates.
Point-in-polygon calculations using an address - the user types an address which is then geocoded to get the coordinates
Point-in-polygon queries for data validation
Can a workflow like this be supported by Collect and Enketo (maybe the new webform engine)

3. What have you tried to fix the issue?
What I thought of is to take the geopoint (Latitude & Longitude) and ingest these into the ArcGIS layer rest end point:*&returnGeometry=true&returnIdsOnly=false&f=json

From the URL above I would replace geometry=148.176%2C-37.491 with geometry=${latitude}%2C${longitude}

But I am stuck on how to accomplish this.

I am also stuck on how to grab the the relevant value from the json output and ingest in the country field

4. Upload any forms or screenshots you can share publicly below.
Map Query.xlsx (547.3 KB)