There's no way to do this within Squarespace unfortunately, you'll need to use an inventory app like Trunk
Trunk can sync inventory in real-time between the same SKUs. If you give all your versions the same SKU, Trunk can keep them in sync within Squarespace. If one sells or changes in stock, it will also adjust the others.
Trunk also supports bundling/kitting/components which allows you to create a master product. Then your other products can depend on this master product in various configurations (e.g. if you're selling pencils, the master product is one pencil, and then you can have packs of 5, 10, 15 depend on this pencil).
Please let me know if any questions, I'm the developer!