@miguelgalaxy here is a example of how you can use the REST API to pull the various info you would need using Javascript inside of a Embedded Task Form:
You just need to change the API endpoints for your needs.
What is your use case for doing this inside of a Task Form?
Based on the info you provided, it sounds like you would be better off creating a small app (or Tasklist/Cockpit plugin) that acted as a dashboard, and then allowed you to create a Process Instance or Task instance from that dashboard)