So I went to Costa Rica and tried a a savoury pastry that is similar to empanadas but it is not empanadas. The pastry had a yellowy-orange colour, the shape of it was rectangular and it was stuffed with some sort of flavourful meat. I really want to know what the name of this food is.
What you describe sounds like a Jamaican Patty. From Explore Costa Rica.com :
A Jamaican patty or pattie is a pastry that contains various fillings and spices baked inside a flaky shell. Technically, it is a beef filled turnover. As its name suggests, it is commonly found in Jamaica, and is also eaten in other areas of Costa Rica, especially on the Caribbean coast. It is traditionally filled with ground beef, however, fillings now include chicken, vegetables, shrimp, lobster, soy and cheese.
They are quite tasty!