mdarray subquery constructor