code: function fixArrayReferences (result, input, options) {
    const arraymap = arrays(input, options)
    for (const [tname, aname] of arraymap) {
      var re = new RegExp(tname, 'g')
      result = result.replace(re, aname)
    }
    return result
  }
docs: turn all types that are 'array' in apib into scala List[MyType]