Whisk together 1/3 cup soy sauce, 1/3 cup pineapple juice, 2 tbsp brown sugar, 2 tbsp ketchup, 1 chopped shallot, 4 chopped garlic cloves, 1 tbsp grated ginger, and a pinch of red pepper flakes in a glass jar or bowl.
Reserve one-third of the sauce for cooking and pour the remaining two-thirds over the chicken pieces; toss to coat and let sit 15 minutes (or up to overnight in the fridge).
While the chicken marinates, make the pineapple-jalapeño salsa by combining 2 cups pineapple chunks, 1/2 small finely chopped shallot, 1 seeded and chopped jalapeño (if using), juice of 1 lime, 2 tbsp fresh thyme leaves, and 1/4 cup chopped cilantro in a bowl; mix and set aside.
Cook the coconut rice: in a medium pot bring 1 (14 oz) can coconut milk and 1/2 cup water to a low boil, add 1 cup basmati rice and a pinch of salt, stir, cover, reduce heat to the lowest setting and cook 10 minutes; then remove from heat and let sit covered 15–20 minutes before fluffing.
Heat 2 tbsp sesame oil in a large skillet over medium-high heat. Add the marinated chicken (discard excess marinade) and cook until browned and cooked through, about 5 minutes, stirring occasionally.
Reduce heat to medium, pour the reserved one-third of the sauce into the skillet, and cook until the sauce thickens and glazes the chicken, about 5 minutes; stir in 1/4 cup chopped cilantro off the heat.
Serve the glazed pineapple chicken over the coconut rice, spoon the pineapple-jalapeño salsa on top, sprinkle diced avocado over each serving, and finish with an extra squeeze of lime if desired.