randarts: Use N_ELEMENTS instead of hardcoded constants