You can use mafft with --reorder option for the reordering of sequences based on the similarity. However, for the consensus, you have to manually get the groups of your interest and make consensus sequences. No* software will do this automatically for you.
(* unless you train the software or get your own software program to do it).