The first transaction described does not require flood insurance because while there is a mobile home on the land it is not affixed to a permanent foundation; therefore, flood insurance is not required.
The second transaction may require flood insurance. You stated that there is a single family residence on the property and that the barn only is located in a SFHA. The barn would typically require flood insurance; however, it may be exempted under the detached structure exemption if the barn is not used for agricultural purposes (used for personal storage for example), is detached completely from the residence, and does not serve in any way as a residence. If the barn can’t meet these three requirements, it would need to be covered by flood insurance based on the lesser of: the loan amount, the maximum required coverage from FEMA, or the replacement cost value.