How to check if 2 items in the array are of specific classes and specific quantities, and then if so, show them in a boolean.

Think that a linear search with a reverse loop comparing IDs would be the obvious choice for a small array. Other search solutions would depend on the number of slots and the number of requirements since the loop will end up being slots * requirements in worse case.

Are you using the class as an ID? I would personally change the class ID to an int, enum, or gameplay tag. Store this ID in an array and check every slot for each. When the required amount of a specific ID is met, remove it from the array so that the next slot only checks the remaining IDs. The search would return true when there are no IDs left to search. If it reaches the end of the array and there are still IDs to check, it would return false.

Is there a quantity limit for each slot, or can multiple slots have the same item? Maybe the item to craft requires more than what a single slot can offer. In this case, the search needs to hold an index of the slots until the sum of all found slots is equal or greater. When consumed, the empty slots will automatically be set to blank from last to first (if this is desired).

Makes sense?