Every day there is a rolling 90% chance to spawn forage/crates. By rolling I mean that if the 90% chance succeeds, there is another 90% chance, if that succeeds another 90% and so on.
If the chance succeeds a tile is chosen at random (on the entire farm). If the spot chosen is on the beach, then a beach forage/crate will be placed. Every 4th item placed will be a crate. Otherwise there is a 15% chance that the item placed will be a crate. (Do note that no crates can be placed on the initial farm load for a brand new game)
If the spot chosen is in the forest area, a piece of seasonal forage will be placed.
If the spot chosen is not valid, then nothing is placed and the code goes back to the next rolling 90% chance.