A general rank based approach to the analysis of block data