Hi Abishek,
In Mendix, you can always create microflows that accept primitive types as parameters and/or return primitives as results. However, I’d argue that only #1 and #3 in your list of use cases actually fit this. #2 and #4 both depend on certain attributes being present in the object you’re operating on (or depend on the object type itself!).
When triggering microflows from the client (pages, buttons, lists, etc) the microflow is bound to the page context, to enforce data integrity in the execution.
To achieve what you’re asking about, you should create some generic microflows for #1 and #3, and then call your new microflows from another microflow that is bound to page context.