In line with the Steve and Uday’s answers, one option would be to use an unstructured vector of int32 of the appropriate size, and lower to a memref of these from your higher-level dialect.
Regarding the (lack of) modularity of this design, one should remember that memref is only what its name tells: an unstructured memory reference. It abstracts a very flat and non-composable type (either in product type or sum type fashion). Anyone working on modeling general-purpose front-end languages would need a richer data type abstraction. Maybe this should lead to the design of a recursive data type dialect, common to a bunch of high-level languages, rather than F18 and the like coming up with their own design?
Albert