how to find if a specific nbt is inside of an array, but comparing it to other storage

what i want to do exactly is test for if an item in my inventory match with an item of a previous stored inventory in a data storage
Continue to help post