Node value from form state

I have a node which I want to update from a form states values. I can set each value individually like:

$node->set("foo", "bar");

Is there a way to mass assign the values instead of setting each individually?