What's the opposite of $page->toArray?

How do i pass a array like yours from outside the class? … call’ new Test’ with a set of fields i want to change?