Nice thread; hope members will respond. Just not sure that many of us will consider building a pack.
ebike.ca is a great source of information about ebikes that do not come turnkey. Grin Technologies (part of ebike.ca) has some really neat ideas and products.
batteryhookup.com is a possible source of used and new batteries. While most will probably stick with 18650/21700 Li-ion chemistry, consider LiFePh= LFP= Lithium Ferrous Phosphate= Lithium Iron batteries. They do not have as concentrated energy but are far safer.
Building a battery pack from scratch is doable but a battery management system should be incorporated. This adds more to the wiring of a pack. Vruzend might be something to try, though I would say making a 'sandwich' pack is prudent with that system.
Our terrain is rocky, hilly and rough. Severe rattling is a given, so making a pack tough enough might be daunting. I chose to buy an assembled pack with chinese cells and minimum elements; no LED indicators or off switch. If I want to de-energize the system, I will disconnect the XT90 plug. The cost of having the company put the pack together, including the wiring of the BMS was about $70 more than buying components myself and assembling. I would have been able to choose cells from Korea and elsewhere but I hope/trust this company to not use junk 18650's.
Charging wires use an XT60 which connects via adapter cable to an XLR(?) socket. Plug the charger in first to an AC source, then use the XLR charger plug to connect to the battery pack. Consider carefully what connections you will have if doing DIY or purchasing different components in an ebike kit.
Given that I'm running 72Volts nominal with a 20Ah pack, it's ok to not go with 21700 because the batteries are laying transverse horizontally in the pack and the ~65mm width is plenty wide as it is (between my knees in the frame triangle).
Turnkey electric bikes will not offer that kind of power but it works for me and our lifestyle. When a battery pack ages to the point of frustration, it will be interesting to see how ebike manufacturers will support pack rebuilding inside a bike frame, given that they may have moved on to other, different models. Ebike kits are easy to replace all components but understand a lot of people are not into the ebike kit look.