Add onion to a small food processor and process until fine. Squeeze the liquid from the onion, then add onion to a medium-sized bowl along with the ground lamb or beef.
Add the spices to the meat mixture and mix to combine. Cover the bowl and place it in the fridge to allow the flavors to come together for few hours.
Divide the meat into eight equal portions. Slice each pita bread in half and carefully stuff with the meat mixture forming a layer of meat into each pita pocket.
Preheat oven to 400°F
(optional step) Brush both sides of the stuffed pitas with olive oil. If you'd like to get grill marks on your Arayes, add a few at a time to a hot grill pan. Press down with a spatula and cook for one minute on each side over medium-high heat.
Arrange Arayes on a baking sheet. For easier cleanup, line the baking sheet with aluminum foil. Bake for 6 minutes on each side or until the meat is cooked and the pita bread is crispy.
Notes
Slice each pita bread sandwich in two to serve as appetizers.
Make sure to drain the excess liquid before mixing the onion with the ground meat. If the mixture is too wet, you'll end up with a soggy pita sandwich.
Use good quality pita bread that is not too thin or flimsy, otherwise, it may not hold up when you stuff it with the meat.
Optionally, Mix pinenuts into the filling before stuffing the Arayes.
The best way to heat Arayes leftovers is in a toaster oven or an air fryer.
If you prefer to have more meat in your pita bread, you can double the kofta recipe.