Bash: Elegant ways to use multiple variables for shortening long strings?
Storing parts of commands in variables and/or using eval is a good way to get weird parsing problems. I'd use a shell function instead:

addDockApp() {
    defaults write com.apple.dock persistent-apps -array-add \
        "&lt;dict&gt;&lt;key&gt;tile-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;file-data&lt;/key&lt;dict&gt;&lt;key&gt;_CFURLString&lt;/key&gt;&lt;string&gt;/Applications/$1&lt;/string&gt;&lt;key&gt;_CFURLStringType&lt;/key&gt;&lt;integer&gt;0&lt;/integer&gt;&lt;/dict&gt;&lt;/dict&gt;&lt;/dict&gt;"
}

addDockApp "Google Chrome.app"
addDockApp "Safari.app"
...etc


Alternately, you could write it as a loop, and iterate over the list of apps to add:

for app in "Google Chrome.app" "Safari.app" "Firefox.app" "Messages.app" \
    "Slack.app" "Microsoft Outlook.app" "Microsoft Word.app" "Microsoft Excel.app" \
    "App Store.app" "System Preferences.app" "zoom.us.app"
do
    defaults write com.apple.dock persistent-apps -array-add \
        "&lt;dict&gt;&lt;key&gt;tile-data&lt;/key&gt;&lt;dict&gt;&lt;key&gt;file-data&lt;/key&lt;dict&gt;&lt;key&gt;_CFURLString&lt;/key&gt;&lt;string&gt;/Applications/$app&lt;/string&gt;&lt;key&gt;_CFURLStringType&lt;/key&gt;&lt;integer&gt;0&lt;/integer&gt;&lt;/dict&gt;&lt;/dict&gt;&lt;/dict&gt;"
done