Describe a time you solved an array-based problem where you had to manipulate data based on given constraints.