Added new method to_array().