Heat a large skillet over medium heat and add 1/2 tablespoon of olive oil and onions with a pinch of salt. Stir to coat, then cover and cook for 15-20 minutes, stirring occasionally until caramelized. While onions are cooking, make the burgers.
In a large bowl, mash beans with a potato masher or fork. I like to mash them halfway, leaving some whole. Add in basil, garlic, paprika, onion powder, salt and pepper, mixing to combine. In a smaller bowl, lightly beat eggs and add in 1 tablespoon olive oil and panko, stirring to mix. Add the egg mixture to the beans, and mix thoroughly to combine, bringing it together with your hands if needed. Separate the beans into 4-6 equal sections and form patties. I think the key to a great patty melt is making them in relevance to the size of your bread slices, so the amount of patties you get may vary.
Heat the same large skillet over medium-high heat and add 1 tablespoon olive oil (or as much as you need). Add burgers and cook on each side until golden, about 5-6 minutes. Remove burgers with a spatula and set on a plate. To make the patty melts, butter one side of bread, placing it in the skillet butter-side down. Add a few handfuls of grated cheese, then place a burger on top. Top that with some onions and more cheese, then one more side of buttered bread, with the buttered side facing up. Cook on medium-low heat (slowly!) until the cheese begins to melt and glue the sandwich together, then flip and cook until the bread is golden and toasty. Eat!