Populate read-only field with data that links to this document

Hopefully this makes more sense when I explain it. For my sales partner form, I have created a multi select table where multiple territory records can be selected. That part is working. Now, I would like to add a custom Table Multiselect field to my territory form where it displays all sales partners assigned to this territory. How can I script this and where would it go, default or fetch from?

Here’s some pseudocode of what I am thinking of to go in the territory form Sales Partners field:

foreach salesPartner
{
  if(salesPartner.Territories.Contains(this)
  {
    Table MultiSelect salesPartners += salesPartner;
  }
}

This is what I want to achieve: (I just manually typed this in as an example)