Mesoscale modelling of miscible and immiscible multicomponent fluids