Implement toArray on OrderState objects