Rules for refreezing food
There are two different issues, which have separate drivers.  There are no specific rules, just consequences of the thaw and freezing cycles on each food--but it is always better to minimize the number of cycles to maintain quality.
Safety
From a safety point of view, the rule is any perishable food (one that is not fairly stable at room temperature such as cold cereal or pretzels) should have its time in the so-called danger zone (40-140 F, 4-60 C) limited to no more than two total hours over its lifetime.  This prevents pathogens, which grow exponentially, from having sufficient time in hospitable conditions to grow and create enough toxins to be harmful.
So if you have something at room temperature for one hour and then freeze it, it would have one hour left on the clock when you thaw it out.
(Note that as people will no doubt otherwise insist on pointing out:  these recommendations are extremely conservative, and are meant to protect the general public health.  You must determine your own willingness to accept risk.)
Quality
In terms of quality, there are two main issues that occur in freezing:  ice crystal formation, and freezer burn.  Additionally, condensation can be a minor issue upon thawing.
Ice Damage
As you freeze food, the water in it freezes (this is obvious).  What may not be obvious is that this frozen water is in crystals, which are hard and sharp, and can penetrate cell walls of meat and vegetables.   This will cause meats to loose moisture on being thawed, and vegetables to weep and become more limp and flaccid.  The more slowly the food is frozen (due to a warmer freezer compartment), the worse the damage is.
Some foods, like fresh vegetables are very sensitive to this type of damage (this is why most freezing directions for vegetables include blanching).  Meats are also somewhat sensitive, but it is not as severe, especially if you take steps to freeze them quickly (freeze in a single layer, set your freezer to its coldest temperature).
Many home freezers are also auto-defrost, which means they periodically warm up to get rid of accumulated frost, and then cool down again.  This can cause ice crystal growth over time.  Chest freezers without auto-defrost do not suffer this problem, but at the cost of requiring manual defrosting periodically.
Food frozen commercially is often done in blast chillers which have forced air circulation and colder temperatures than are achievable with home freezers and so freeze food much more rapidly than is possible at home, resulting in a higher quality product as long as the frozen state is maintained well.
Other foods such as purees or soups suffer little from ice crystal damage, and so are not as much of an issue.
Freezer Burn
Freezer burn happens when water sublimates (evaporates directly from the frozen state to vapor).  This dries out the food, giving it a leathery, burned appearance.  It is the same mechanism used intentionally in creating freeze dried foods (although that is usually done more rapidly and under a partial vacuum, to improve quality).
You can mitigate or prevent freezer burn by wrapping food quite tightly, so there is not room for air circulation at its surface.   This may involve multiple layers such as film wrap, followed by aluminum foil.
Condensation
Some foods, like cheesecakes, will react poorly to getting wet.  If thawed unwrapped, water may condense directly on the food, beading on its surface and reducing the quality.
If you do freeze a food like this, you want to wrap it very well (which also helps with freezer burn), and fully thaw it before unwrapping to keep the condensation off the surface of the food.
Specific Examples
Of the specific examples you have enumerated:

Ginger garlic paste, green chili paste -- as a paste, it is already soft and somewhat liquid, so ice damage is not really an issue.
Dough -- Most doughs freeze well, and don't have a cell structure to disrupt.  If the dough is an active yeast dough, multiple cycles are going to slowly reduce the effectiveness of the yeast by killing off some each cycle.
Curries -- Cooked food in sauces, especially braises which many curries are, usually freeze extremely well.  They are not subject to much ice damage, as they are already softened during the cooking process.
Frozen green peas -- If commercially frozen, they will have minimal damage, and are already blanched.  If you have blanched them, the cell walls will already be weakened.  Still, many people are very sensitive to the quality of their peas, so this is one of the foods that is more likely to give you poor outcomes.

Better Practice
A far better practice than thawing and refreezing is to freeze in smaller containers (such as four 1 quart zipper type bags of stock, instead of one large gallon container).
This will allow you to take out only what you need, minimizing handling (for safety) and thaw/freeze cycles for food quality.
It is also far more convenient than having to thaw the food, since you have less to thaw (which is faster).  Some foods can even me used directly from the frozen state if you don't have to thaw them in order to get the amount you require.