You'll need to be careful how you use your technical terms to avoid possible confusion:
I have a "Checkout" layout that consists of a "Barcode" field which is related to the item barcode found in the inventory list.
This tells me that you have a "checkout" TABLE linked to an Inventory list TABLE by the barcode fields in each table. Layouts and tables are two different things even though they often have identical names.
A script is set up to create a new field once a barcode is scanned
That's actually impossible. Scripts cannot create new fields. They can create a new RECORD, and I believe that this is what you are describing.
The problem I'm having with it is that whenever I clear the Checkout layout of it's data it checks all the items back in.
And how are you "clearing the layout"?
I would guess that you are either deleting records or deleting data from fields. Neither sounds like the correct thing to do here. Normally, you would keep your checkout records unmodified until the item thus checked out is checked back in and you'd have a field for when an item is checked in and when it is checked out. With that approach, you'd never need to "clear" any data from your tables after checking stuff in/out.
Thanks so much! Sorry about the terminology confusion, I picked this program up recently and I'm still getting my head around all the proper terms and their relationships to one another. This helps me out alot though, completely changed my thoughts on how to organize this, I should be able to work something out.