Cook the elbow macaroni according to package instructions until al dente. Drain and rinse under cold water to cool. Set aside.
In a large mixing bowl, combine the corn, mayonnaise, sour cream, lime juice, chili powder, garlic powder, salt, and black pepper. Mix well until smooth.
Add the cooled macaroni, diced red bell pepper, and chopped cilantro to the bowl. Stir until all ingredients are well combined.
If using, gently fold in the diced avocado and crumbled cotija cheese.
Cover the salad and refrigerate for at least 30 minutes to allow the flavors to meld.
Serve chilled or at room temperature.