In a medium saucepan, combine the soy sauce, sugar, pineapple juice, minced garlic (or garlic powder), grated ginger (or ginger powder), and black pepper; stir and bring to a gentle boil over medium heat, watching for foaming.
As soon as the mixture begins to foam or rise, remove the pan from the heat and scoop out 1 cup of the hot sauce; set that cup aside and let it cool to room temperature for use as the marinade.
Whisk the cornstarch and 2 tablespoons water in a small bowl to make a smooth slurry.
Return the saucepan to medium-high heat and slowly whisk the cornstarch slurry into the remaining hot sauce; continue stirring 1–2 minutes until the sauce thickens, then remove from heat and cool completely before refrigerating in an airtight container.
Place the chicken thighs in a large zip-top bag or shallow dish and pour the reserved 1 cup of cooled sauce over them; seal or cover and refrigerate at least 2 hours or preferably 4–8 hours, turning once halfway through.
About 30 minutes before cooking, remove the chicken from the refrigerator to come closer to room temperature and preheat a grill to medium-high (375–400°F). Clean and oil the grates.
Remove chicken from the marinade, allowing excess to drip off, and discard the used marinade.
Grill the chicken with the lid closed 4–5 minutes per side until grill marks form and the internal temperature reaches 165°F; during the last 2 minutes brush both sides with the reserved thickened teriyaki sauce.
Transfer the chicken to a clean plate, tent loosely with foil and rest 5 minutes.
Sprinkle with toasted sesame seeds and sliced green onions and serve with additional teriyaki sauce if desired.