rhogen: add typed (array|hash){1,2} converters for ruby and js