You can add some liquid to mayonnaise without breaking it.
I've added smallish amounts of soy sauce and hot sauce and such to mayonnaise with success.
The question would be, could you get enough coconut flavor into the mayonnaise before breaking the emulsion?
Hard to say without trying.
If it doesn't work, you can try using coconut cream instead of coconut milk.
Like the name suggests, coconut cream has a higher amount of fat and a lower amount of water than coconut milk.
This should allow you to add more of it to the mayonnaise without making it too liquid.
cooking.stackexchange.com/users/70120/Juhasz
Depending on the type of coconut milk you have access to, you could only use the upper, creamy part of the coconut milk.
Here in Germany (and the Netherlands, as we often buy there)
the out of the box
coconut milk is not homogenized, so the fat and the watery part have split.
Coconut Cream might be an option, but it is quite sweet.
Perhaps a light variant could do the trick.
cooking.stackexchange.com/users/26369/jmk
If you do not want to dilute the mayonnaise with liquid, coconut milk powder is an option.
Depending on how much you add, you might find that your mayo is too thick.
If that is the case, you could get around this by making up a paste beforehand with a little water.
https://www.tesco.com/groceries/en-GB/products/268726658
cooking.stackexchange.com/users/67481/Greybeard
This is speculative, as I've not tried this, and I'm assuming that by 'the flavour of coconut milk' you mean 'coconut flavour'.
Creamed coconut/coconut butter, rather than coconut cream, may be your answer.
It comes as a solid block, in solid form in individual sachets and jars.
Creamed coconut, also known as coconut butter, is a coconut product made from the unsweetened dehydrated fresh pulp of a mature coconut, ground to a semi-solid white creamy paste.
It is sold in the form of a hard white block which can be stored at room temperature.
https://en.wikipedia.org/wiki/Creamed_coconut
I use this rather than canned coconut milk or cream when making things like Rendang, because it doesn't have all the emulsifiers and thickeners of the brands I can buy locally, and at around 70% fats should incorporate more successfully into mayo than coconut milk which can be around 70% water.
When cooking you can just add solid chunks of the product to a sauce and it will melt and dissolve, but you can also melt it first and in this melted form you may be able to successfully whip it into a pre-made mayonnaise.
With the sachets you just place the sealed sachet into a jug of hot water until the contents liquefy, but you would also be able to melt some in a bain-marie as you would do with chocolate.
According to wikipedia Coconut oil melts at around 24°C, so in warmer weather it is a liquid paste.
so you may need to do very little to get it to a state suitable for incorporating
(I live in the north of Scotland so haven't experienced it in that state.)
I would suggest that to improve the chances of spreading the flavour evenly through your mayo, it would be best to add the mayonnaise to the creamed coconut a little at a time rather than dumping the coconut into the mayo.
Having the mayo at room temperature rather than fridge-cold will also help avoid resetting the coconut cream before it is incorporated.
It is likely that quite a small amount would be needed as the flavour in this dehydrated product is more concentrated than in coconut milk, in my experience.
Edit to add: If it is just the flavour of coconut you are looking for, the other option might be a much more concentrated natural coconut extract.
cooking.stackexchange.com/users/64479/Spagirl
If you want coconut flavor in something that is already a semiliquid I would not use liquid coconut products at all.
Use shredded coconut.
Unsweetened shredded coconut is powerfully coconutty.
You can put it thru a blender or coffee bean grinder to pulverize it further if you do not like the stringy consistency in your mayo.
The addition of these coconut solids will not affect the creaminess of your mayo base unless you add a lot.
It is worth mentioning that you can also just add coconut flavor if that is not cheating for you.
Coconut flavor comes in a little bottle like vanilla.
Along those lines I used to keep a bottle of Malibu coconut rum to add to stir fry; Malibu is also powerfully coconut flavored and you can cook off the alcohol in a few seconds using a saucepan.
If you go that route, cook down the Malibu by itself then add to mayo.
cooking.stackexchange.com/users/53826/Willk
I want to make a mayonnaise-based sandwich spread with coconut milk in it, but I'm concerned that adding enough coconut milk for any flavor will make the spread too runny.    Note, I do not want to make mayonnaise from scratch - I have seen recipes where you infuse the oil in homemade mayo first then use it to make mayo. I'm talking about using packaged mayo as the base, ending up with the texture of mayonnaise and the additional taste of coconut milk.
Can mayonnaise be infused with coconut, without getting watery?
cooking.stackexchange.com
<coconut><mayonnaise><infusion>
cooking.stackexchange.com/questions/100912
cooking.stackexchange.com/users/60789/A Barron
You can add some liquid to mayonnaise without breaking it, but it would be easier to use coconut cream, coconut milk powder, coconut butter,, unsweetened shredded coconut or coconut flavouring. Small amounts of liquid can be added to matonnaise without breaking it, so some coconut milk could be added. However, better options may be powdered coconut milk, coconut butter or shredded coconut. Finally, coconut flavouring is available.
Mayonnaise will not break if a little liquid is added so coconut milk/cream could be added as a flavouring. Coconut milk powder may be a better option. A solid could be added rather than a liquid: coconut butter or shredded coconut. Coconut flavouring is also available.