Pulse onions, cilantro, parsley, cumin, paprika, allspice, red pepper flakes, and ras-el-hanout in a food processor until very finely chopped; season with salt.
Place lamb in a large dish and rub with spice mixture.
Cover and chill at least 2 hours.
Prepare grill for medium-high heat and oil grate.
Grill lamb to desired doneness, about 3 minutes per side for medium-rare. Let rest at least 5 minutes before serving.
Do Ahead: Lamb can be marinated 12 hours ahead. Keep chilled.