Interface and function for standardized object-to-array conversion.