added EAV support to from_array()