A few years ago, Andris Bērziņš answered a question about populating a dropdown field’s values with a REST request. His answer for how to solve this with a P2 plugin:
Even today, it’s a good summary of the solution. I wonder if anyone knows any open-source examples that demonstrate this approach? Or any examples that solve the problem any other way?