Baking halloumi is best done while shallow frying in oil. You can use butter but I prefer to use oil. I use coconut oil for frying. I heat it on high and quickly brown the halloumi on both sides. Be aware that it can splash so using a splashing shield might be needed.