It’s a no-brainer—order the 2017 iMac 5K with 8GB memory (not 16 or 32 or 64), and then order 64GB memory for iMac 5K from OWC for a savings of about $760*. OWC also has 32GB memory for the 2017 iMac 5K.
* At the time this was written, the upcharge at the Apple Store from 8GB to 64GB was $1400. OWC 64GB memory for 2017 iMac 5K was about $640, for a savings of a whopping $760. Apple’s memory prices are a poor value for customers, but a nice profit center for Apple.