I think I see what you're getting at here.
Is this for an assignment? If so, you'll want to go over the instructions very carefully. If it specifies that add must append to an array or insert at the end, then yes you'll need to figure out the best way of shuffling back. If it does not specify this, and it does not specify a sort order for the array, than I'd suggest insertion via iteration to find the first null entry. I would perceive this currently as tracking a count of the known values, and adding based on the known number of records.
You can shift back the array as well. Its a matter of determining what you want to remove, and then from that point on reassigning the values back by one (or going the other way and looking forward). You'll need to deal with the null insertion at the end though, otherwise it would replicate the last value in the list. So you can do this within a single loop iteration as well.
If this isn't for an assignment, than you don't deal with arrays at all. You deal with a collection designed for volume insert/remove operations on it. Suggested collection types would be LinkedLists if order doesn't matter (ie in order only), or a Tree if order is important. There is no built in Tree ADT in Java though, so you'd need to write one (or find one online). Linked types are the most ideal since you don't need to do anything special to free up space. Simply remove the item, and insert wherever.
header('HTTP/1.1 420 Enhance Your Calm');