Classifying 5d SCFTs via 6d SCFTs: arbitrary rank