For spawning a property as array by its value, your have to do a similar expression like to spawn objects, just use it behind the value you need instead of using it at property name.
"categories": "expression|spawn(5)"
This will generate the expected array.