Which state of matter has variable density, and will expand to fill whatever volume in which it is confined?
Is there a question here?
Do you speak of gases? These definitely have mass, and occupy space uniformly up to the volume of the container in which the gas is confined. Of course, condensed phases, solids, and liquids, ALSO have mass, and their more or less constant density necessarily means that they occupy some volume......but usually this volume is miniscule compared to that occupied by a gas.
Anyway, you will have to refine your question.