You could use std.variant to simulate dynamic typing, but can be a bit of a mess.
You also could do something like this:
int[][] a = [[1], [2, 3, 4], [5]]; That's also a bit ugly, though.In the end, you'll probably end up structuring your data in some other way.
Next time I answer a question, I'd better make sure I'm thinking of the right language.