Question How to create a custom partition? (Not related to the SDCARD)

Hi,

I am trying to figure out ways to create a new partition additionally to the standard ones, like system, boot or data. As the title indicates, my intention is not to create an ext4 partition inside the sdcard to put apps into it, my end goal is completely different as the first sentence indicates.

Do I need to do it at build time? Or can it be done at boot time (by starting a service that uses fdisk via init.rc)? Any resources that could help me understand what needs to be done?

Thanks!