Named references / dictionary support
For example the [TTF format](https://github.com/kaitai-io/kaitai_struct_formats/blob/ttf/font/ttf.ksy) contains multiple records, each one has a "tag" name which is unique across the file.

Some record references other named record's fields. As the order of records is variable, we cannot find the referenced record by index, we can only find it by name.

So we'd probably need either some kind of dictionary or named reference support. A bonus feature would be if these records could be referenced in statically-typed languages like C# as typed fields.

Here is a simplified example (sadly it's still a large one):
```yaml
seq:
  - id: entries
    type: entry
    size-eos: true
types:
  entry:
    seq:
      - id: tag
        type: str
        size: 4
        encoding: ascii
      - id: length
        type: u4
      - id: value
        size: length
        type:
          switch-on: tag
          cases:
            "'thdr'": thdr
            "'tval'": tval
  thdr:
    seq:
      - id: item_count
        type: u4
  tval:
    seq:
      - id: items
        type: u4
        repeat: expr
        repeat-expr: _parent.thdr.item_count # or _parent.refs["thdr"].item_count
```

One of the options is to implement as an instance I presume, but implementing lambdas may not be trivial:

```yaml
seq:
  ...
types:
  ...
instances:
  thdr:
    value: entries.filter(x => x.tag == "thdr")[0].value
    type: thdr # ???
```

Other option is thinking about some records as singletons, so we could put them a global(?) or ksy-local(?) storage, like:
```yaml
  thdr:
    seq:
      - id: item_count
        type: u4
    ref: thdr
```
Which would automatically put a `thdr` field to the root (TTF) record.