In order to append, you need to have free space at the end of the slice. If the space comes from a pre-determined array, that’s BoundedArray. If the space needs to be allocated from the heap, it’s ArrayList. How would like to obtain the space for appending?
This looks good to me. If you want to reuse code from the std library, you could just initialize an array list with your slice, and give it a failing allocator. Then append is forced to only use the space you provided.
This, by itself, doesn’t work, because you can’t call append or any other allocating function. You’d have to provide a failing allocator to make this legal again.