Creating Arrays Dynamically based on Previously Parsed Data - .FIT
l'm attempting to parse through a list of Records. Also, this is for .FIT used by fitness and medical devices.

```yaml
seq:
  - id: file_header
    type: file_header
  - id: records
    type: record
    repeat: expr
    repeat-expr: file_header.num_records
```
The record Type...
```yaml
record:
    seq:
      - id: header
        type: record_header
      - id: content
        type:
          switch-on: header.type ? 0 : header.message_type ? 1 : 0
          cases:
            0: record_content_data
            1: record_content_definition
```
Some records are data records, some are definition. Definition Records define the fields that will be provided in upcoming Data Messages.  They are linked by a local_message_type in the records' header.  So a Definition comes in for local_message_type = 1, and any following Data Records with local_message_type = 1 will follow that schema.  

```yaml
# Omits some contents for clarity
record_content_definition:
    seq:  
# The number of 3 byte fields that will be defined.
      - id: fields 
        type: u1 
# The definitions of fields - includes size and typing
      - id: field_definitions
        type: field_definition
        repeat: expr
        repeat-expr: fields
```
A graphic example where local_message_type = 0 is defined in a Definition Record, and then followed up by a Data Record with the implementation.  
![image](https://user-images.githubusercontent.com/1377071/71495086-fe105c80-2819-11ea-85a1-86cdbb93c1b8.png)

When I'm defining the fields to be read in a Data Record, how can I know the information read in a previous Definition Record?
```yaml
  record_content_data:
    seq:
      - id: fields
        type: # Depends on what was defined previously in a Definition Record
        repeat: expr
        repeat-expr: # The number of fields defined in the Definition Record
```
My natural feeling is to set some kind of "global" when I encounter a Definition Message, that I can then read during a Data Message.  I'm banging my head against the wall.

Does Kaitai have a method of implementing this kind of binary structure?



