The first part sounds like what's already in Character Config > UI Settings > Party List tab? You can set it to sort the roles in any order (e.g. Tank Healer DPS or Tank DPS Healer or DPS Tank Healer etc.) for each role individually.

Splitting melee and ranged would be nice.