It's not accepting the '${(f)...}' for some reason.
You can't add spaces in random places. In your initial question you had output=( ${(f) "$( print -rl $output | sed [cut] )" } ) with a space after ${(f) and one before }. These aren't allowed. Remove them and it will work, or at least stop complaining about a bad substitution.
Philippe