I think that what you want to get is the covariance matrix i.e:
df %>%
mutate(.id=row_number()) %>%
unnest_longer(c(Fruits)) %>%
mutate(value = 1) %>%
pivot_wider(id_cols=.id, names_from=Fruits) %>%
select(-.id) -> result
# replacing NA s with 0 s
result[is.na(result)] <- 0
result
# A tibble: 6 x 4
Apple Pear Banana Watermelon
<dbl> <dbl> <dbl> <dbl>
1 1 1 1 0
2 0 1 0 0
3 1 0 1 0
4 1 1 0 0
5 1 1 1 1
6 0 1 0 1
result %>% cov
Apple Pear Banana Watermelon
Apple 0.26666667 -0.06666667 0.2 -0.06666667
Pear -0.06666667 0.16666667 -0.1 0.06666667
Banana 0.20000000 -0.10000000 0.3 0.00000000
Watermelon -0.06666667 0.06666667 0.0 0.26666667
data
df <- tibble(Fruits=list(list("Apple", "Pear", "Banana"),
list("Pear"),
list("Banana", "Apple"),
list("Apple", "Pear"),
list("Watermelon", "Apple", "Pear", "Banana"),
list("Pear", "Watermelon")))