Preheat oven to 350 degrees F. Thaw frozen phyllo for about 1 hour before beginning, leaving wrapped tightly in packaging to avoid drying out.
In heavy-bottomed sauce pot, heat butter until melted and then whisk in flour. Continue whisking until mixture has completely homogenized; then stir in milk. Continue whisking to incorporate completely and remove any lumps.
Continue cooking over medium heat, stirring continuously, until milk has thickened. Add salt and pepper.
Fold in ham, cheese and onions and allow to cool slightly.
Working quickly, spray and lay out 3 sheets of phyllo. Keep all phyllo not actively being used wrapped tightly to avoid drying out. Cut phyllo into thirds the long way, making 3 long strips.
Place about 1 Tbsp. filling about 1 inch from corner of each strip. Fold diagonally across to form a triangle; continue to fold triangle onto itself. Repeat until all filling is used up. Spray outside of each tart and place on baking sheet, with at least an inch between them.