I'm not sure I fully understand your database schema, but assuming your table structure is this:
bom(oem, part_name, amount)
You already know that you can select all the parts for one OEM using:
SELECT * FROM bom WHERE oem="name";
and that you can select all the parts for multiple OEMs by adding all the names to the WHERE clause using OR logic:
SELECT * FROM bom WHERE (oem="name1") OR (oem="name2") etc.;
The easiest way to select all the parts that are in "oem1" but not in "oem2" is probably to use arrays like you said.
Assuming MySQL:
$oem1_query = mysql_query("SELECT part_name, amount FROM bom WHERE oem=\"oem1\"");
$oem1 = array();
while ($row = mysql_fetch_assoc($oem1_query)) { $oem1[] = $row; }
$oem2_query = mysql_query("SELECT part_name, amount FROM bom WHERE oem=\"oem2\"");
$oem2 = array();
while ($row = mysql_fetch_assoc($oem2_query)) { $oem2[] = $row; }
$parts_in_oem1_and_not_oem2 = array_diff($oem1, $oem2);
But I may have misunderstood what you're trying to achieve.