Part vector selection

not this solution
suppose i want to send byte by byte data
i can use a[i+:8]=b; it is working
but my case is i want to write 50 bytes some times 45 some times 33 its depend on user
then how i can write memory logic for this