rtos: use ARRAY_SIZE() and simplify rtos_type.create()