rtos: Use ARRAY_SIZE instead of coding it by hand