1 pineapple, peeled, cored, and cut into 1/8-by-4 3/4-inch slices
1 can (13.5 ounces) coconut milk
3 large eggs, lightly beaten
1 tablespoon grated lime zest plus 2 tablespoons juice
2 teaspoons pure vanilla extract
3 cups all-purpose flour (spooned and leveled)
1 tablespoon baking powder
2 teaspoons ground allspice
1 teaspoon fine salt
Preheat oven to 350 degrees. Melt 5 tablespoons butter and add to a 9-inch square baking pan, tilting to coat bottom and sides. Sprinkle with 1/2 cup sugar and arrange pineapple slices in 2 slightly overlapping rows.
In a large microwave-safe bowl, microwave coconut milk and remaining 4 tablespoons butter in 20-second increments until butter is melted but not hot. Whisk remaining cup sugar to remove lumps, then add to bowl. Whisk in eggs, lime zest and juice, and vanilla.
Whisk together flour, baking powder, allspice, and salt. Add flour mixture to coconut milk mixture in 3 additions, whisking until smooth. Pour batter over pineapple and spread in an even layer. Tap pan on counter to remove any air bubbles. Bake until cake is golden brown and a toothpick inserted into center comes out clean, 1 hour. Let cool on a wire rack, 1 hour. Run a knife around edges before inverting onto a platter. Serve warm.