Make get_stats() more extensible by using array of args. #857