General recursive functionals of finite type and hierarchies of functions