This should do the trick. You set up your vector of possible fruits to select from, and then everywhere there is an NA in df$fruit, pick a random element from the possible fruit vector to overwrite it with:
randomFruits = c("apple", "banana", "peach", "pear", "strawberry")
df$fruit[is.na(df$fruit)] = ...
The default quantiles with quantile are 0%, 25%, 50%, 75%, 100%.
This means that the quartiles Q1 and Q3 are the second and fourth value in the two vector you obtain.
Since indexes start at 1 it means that you can obtain Q1 with ar_quantiles and Q3 with ar_quantiles. Currently you're using indexes 1 and 2 and that's certainly what causes the problem.
You can use case_when() and list the conditions in the order of your rank. Since your dummy variables are already os type logical, the following should work:
WhatINeed_2 = case_when(
Medical ~ "Medical",
NoID ~ "NoID",
Refuse ~ "Refuse",
TRUE ~ NA_character_