The JSONata wildcard operator will select the values of all fields in the context object.
$.*[type="array"]
JSONata Playground: https://jsonatastudio.com/playground/3007924a