Generating array parameters for scatter

Using the example here Scattering Workflows – Common Workflow Language User Guide

If my top level workflow input is a number say

#!/usr/bin/env cwl-runner

cwlVersion: v1.0
class: Workflow

requirements:
  ScatterFeatureRequirement: {}

inputs:
  count: int

steps:
  echo:
    run: 1st-tool.cwl
    scatter: message
    in:
      message: message_array
    out: []

outputs: []

How can I create/generate message_array on the fly using count as an input to some function to create/generate the array ?

Cheers

If I’m understanding correctly you need a step before “echo” that is an ExpressionTool and use JavaScript to take count and output an array that you can pass to echo