Corn is a grain. Beans and peas are legumes.
Maybe you should just Google vegetables, fruits, and legumes and get an idea of what they include.
Basically if you are trying to lose weight as quickly as possible, you should simply stick to green leafy vegetables, protein from meats and eggs, and fats from meat, eggs, fish oil, and coconut and/or palm oils. Avoid starchy vegetables, legumes, all fruits and of course grains. That's it. Avoid everything else.
You could cycle between high and low amounts of fats and/or include intermittent fasting. That will get you the quickest fat loss.
Also, regarding glycemic index or load. It really does not matter because once the carbs are converted into blood glucose, it takes the same amount of insulin to deal with it on a gram for gram basis regardless of whether they came from low or high glycemic carbs. And since you are trying to lose weight, keeping insulin as low as possible is what you need to do. So you need to avoid as many carbs as possible if you want to lose weight as quickly as possible.