Are loving-kindness and compassion (metta and karuna) special kind of attachments?
So is it correct the in order to practice metta and karuna, we need to have an attachment to begin with?


Well, attachment is a default software built into the core kernel of every human's "operating system", so whether we need to have it or not is kinda irrelevant. And no, there's no need to come up with some fabrication or some altered reality about the other person's personality in order to cultivate metta/karuna. It's a truth  that both evil and goodness co-exist within every single human being, it's just that the relative ratio is different from person to person. So it's not a fabrication to focus on a person's 'good side', because s/he does have a good side! So the beauty of metta/karuna cultivation is that one can start training right away, even with their existing attachment at the beginning stage. But as one proceeds to higher, deeper, more subtle levels of the Path, the attachment will naturally subside and eventually goes away completely. Once it's become second nature, Metta/karuna at that stage will no longer involves any kind of attachment at all.