Bulk assigning attributes is not the difficult part. That would be maintaining products after you have already assigned them those attributes. If a product has sizes 20, 21, 30, 31, 40, 41 and it gets assigned to the sizerange attributes of 20-30, 31- 40, 41-50, but then it runs out of stock for 20, 21, 30, 31, 40 after a little time, then it should not be listed under the 20-30, and/or 31-40 sizerange attributes.
This thing had better be dynamic, otherwise it could never work irl.
I’ll keep looking for alternative solutions maybe.