Add contstructor argument to easily instantiate an object with the array data.