[Moto Z Questions & Answers] HippieFlasher:
I have gotten stuck with bootloops a couple times now, for me re-flashing a backup or custom rom or custom kernel didn't fix it either. Keep in mind that you cannot go back to 6.0.1 once you have flashed 7.0, the bootloader won't allow it. I have had to flash back to a stock firmware from https:// firmware.center/firmware/Motorola/Moto%20Z/Stock/XT1650-03/ (remove the space after https:// ) and re-fastboot flash TWRP, re-root, and restore my Titanium Backups to get going again.

It's extremely helpful if you create a servicefile.bat to flash all the firmware parts in the right order. This is the one I made for flashing the RETMX 7.0 image (the main difference I noticed between different firmwares from that link is the number of sparsechunks, so add or delete lines as necessary. I'm sure all this info is available elsewhere, but I didn't manage to find it all in one shot. So I figured I would post it to help others out that are in the same boat. Also note that even though you are re-flashing the bootloader.img it does not re-lock your bootloader.

echo off
fastboot getvar max-sparse-size
fastboot oem fb_mode_set
fastboot flash partition gpt.bin
fastboot flash bootloader bootloader.img
fastboot flash modem NON-HLOS.bin
fastboot flash fsg fsg.mbn
fastboot erase modemst1
fastboot erase modemst2
fastboot flash bluetooth BTFM.bin
fastboot flash dsp adspso.bin
fastboot flash logo logo.bin
fastboot flash boot boot.img
fastboot flash recovery recovery.img
fastboot flash system system.img_sparsechunk.0
fastboot flash system system.img_sparsechunk.1
fastboot flash system system.img_sparsechunk.2
fastboot flash system system.img_sparsechunk.3
fastboot flash system system.img_sparsechunk.4
fastboot flash system system.img_sparsechunk.5
fastboot flash system system.img_sparsechunk.6
fastboot flash system system.img_sparsechunk.7
fastboot flash system system.img_sparsechunk.8
fastboot flash system system.img_sparsechunk.9
fastboot flash system system.img_sparsechunk.10
fastboot flash system system.img_sparsechunk.11
fastboot flash system system.img_sparsechunk.12
fastboot flash system system.img_sparsechunk.13
fastboot flash system system.img_sparsechunk.14
fastboot flash system system.img_sparsechunk.15
fastboot flash system system.img_sparsechunk.16
fastboot flash oem oem.img
fastboot erase carrier
fastboot oem fb_mode_clear
pause
fastboot reboot
exit

Copy the above text and paste it into a new text file and change the name to "servicefile.bat" without quotes (not servicefile.bat.txt), and drop it in with the extracted firmware files. Then either copy-paste your adb and fastboot files into that folder or drop all that folder's contents into your Users/*YOURNAME*/App Data/Local/Android/sdk/platform-tools/ folder. Or better yet, add "%USERPROFILE%\AppData\Local\Android\sdk\platform-tools" to your Path in your system's Environment Variables. The latter will make adb and fastboot work from any command prompt window, then you can just press shift+right-click in the folder that already has the firmware files and choose "Open command window here" and then just type servicefile.bat and press enter. Hope this helps! Good Luck and Happy Flashing!