In C#, if I have a class, I can initialise it like this:
var myClass = new MyClass() { MyArray = someData.Select(x => new data() {aa = x.a, ab = x.b})