I did this too and I was completely stock with a stock recovery and locked bootloader and no way to get into the system because of the bootloop.
But there is a way to fix it without unlocking the bootloader and losing your data; adb sideload an OTA from recovery. The OTA has to include a radio.
I was on the latest Android M release and I thought I might have to wait until Google released another update with a radio included, but thankfully I found a signed zip for Android N beta version and it got me back into the system with all my data intact.