How to display structured field data in pages section 'info'

I have a series of events that are categorized through a multiselect query:

  type:
    width: 1/2
    label: Type
    type: multiselect
    translate: false
    options: query
    query:
      fetch: site.page('types').types.toStructure
      text: "{{ structureItem.title }}"
      value: "{{ structureItem.autoid }}"

This query pulls from a structured field from a ‘Types’ page:

title: Types
fields:
  types:
    label: Types
    type: structure
    fields:
      autoid:
        type: hidden
        translate: false
      title:
        label: Title
        type: text
      description:
        label: Description
        type: textarea

I’m trying to pull this information into the pages section ‘info’, so for example, Test Program is tagged with Talk and Exhibition, I would like to show this to the user on the right side:

I’m a bit confused how to bring this in as info: "{{page.type}}" just shows the saved autoid(s) of course.

I reality you would have to query the structure field to get the realy values via the autoid. I think this is best done via a page model.

Thank you @texnixe this is exactly what I was looking for. In case it helps anyone else, this was my solution:

/site/models/event.php

class EventPage extends Page {
  public function types() {
    $type_ids = explode(", ", $this->type());

    return implode(", ", site()->page('types')
      ->types()
      ->toStructure()
      ->filterBy('autoid', 'in', $type_ids)
      ->pluck('title'));
  }
}

I’m wondering if this coudl be written better as the exploding/imploding feels a bit hacky to me, but it does work!