http://www.tomshardware.com/news/intel-100-series-hsio-chipset,30210.html
The Z170 chipset itself has 26 HSIO lanes, 20 of which are PCIe3.0 lanes of which MB manufacturer can, with some restriction, configure as whatever they want.
A PCi-E storage device can be connected to HSIO lanes 15-18, 19-22, or 23-26; however, they cannot be connected to any other group of 4 HSIO lanes.
In each of those configurations, the PCIe x4 lanes will always overlap with 2x SATA ports and therefore 2x SATA ports will likely be disabled whenever a PCIe device is used (the first 2x SATA can be configured at 2 specific lanes each-either as lanes 15-16 or 19-20 to avoid conflict with the PCIe based storage device, depend on the way the MB manufacturer configure those lanes however, the secondary lanes configuration for the SATA ports may not be available and they can get rendered unusable immediately when the PCIe device is installed).