Abstracted the query array update function more away from the model